[RFR] Fix clobbered address passed to TSAN

Arthur Eubanks aeubanks at google.com
Wed Jun 26 15:46:57 UTC 2019


webrev:
http://cr.openjdk.java.net/~aeubanks/tsanarrayclobber/webrev.00/index.html
(ignore the wrong description, webrev.ksh is weird, it's good locally)

Fix clobbered address passed to TSAN

access_load_at() sometimes clobbered the address we passed to TSAN in
tsan_observe_load_or_store().

Do the TSAN instrumentation first, then do the load. Initially the order
was access_load_at(), then TSAN instrumentation. Field accesses can behave
as volatile, and I wanted arrays to match up wi
th the field TSAN instrumentation/actual load order. But it doesn't really
matter for array loads since they can never be volatile.
Added some asserts for fastdebug that the oop is valid and that the
field/element offset is within the oop size. The size check fails without
the TSAN instrumentation/actual load reordering becau
se the offset register was clobbered.


More information about the tsan-dev mailing list