[Bug 145] Java volatile and final access flags are ignored, except in reflection

[email protected] Sun, 24 Jul 2005 01:39:59 -0400
Newsgroups gmane.comp.java.vm.sablevm.bugs
Message-ID <[email protected]>
http://sablevm.org/bugs/show_bug.cgi?id=145





------- Additional Comments From [email protected]  2005-07-24 01:39 -------
FINAL FIELDS:

i added a bit into object headers, decreasing the recursive count, in my sandbox.

svn diff -r4309:4310
svn+ssh://svn.sablevm.org/public/developers/chris/sandbox/sablevm

n.b. technically _svmf_is_set_flag should not be passed a lockword... better to
manually inline that.

however, i am not actually sure this bit is needed, and i might actually revert
it.  according to the cookbook rules, you need a LoadLoad on all loads of a
final field if the arch does not "not intrinsically provide ordering on indirect
loads", which most prominently means alpha, but never for just the first load.

you definitely need a single StoreStore before leaving a constructor in which a
final field was written.  probably the best way to track this is to remember if
we're in a constructor.  StoreStore is a no-op on x86 and x86_64, but not ppc.

VOLATILE FIELDS:

i added (in my sandbox in instructions.m4.c) the following barriers: StoreStore
before and StoreLoad after each volatile store, and LoadLoad + LoadStore after
each volatile load.

the code is not very well engineered, but it works for now... need to figure out
what we're doing for all three engines wrt to generating special versions of
instructions before committing to anything.



------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.