[Bug 144] New: single-value replacement trick is not SMP safe
[email protected] Fri, 24 Jun 2005 20:14:02 -0400
| Newsgroups | gmane.comp.java.vm.sablevm.bugs |
|---|---|
| Message-ID | <[email protected]> |
http://sablevm.org/bugs/show_bug.cgi?id=144
Summary: single-value replacement trick is not SMP safe
Product: SableVM
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: default
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
from bug 92
==================
I realized when debugging my own spmt code that any time you have a word
guarding other parts of memory, you need a memory barrier before you write to
it. The single-value replacement idea depends on an specific ordering of writes.
For example, in preparation sequences, the GOTO is replaced at the very end.
But what happens if the actual GOTO write is made visible to other processors
*before* the other writes that the word guards? This might happen for one
reason or another on an SMP machine. It means the instruction (I observed it
for LDC_STRING) can read unprepared values from the code array.
I think this may be a problem in several places.
If you guys can think of any other examples where the value of a word implies
some particular value / safety property / data type of other words, it is likely
that a memory barrier is needed.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.