hg: tsan/dev: Fix clobbered address passed to TSAN
aeubanks at google.com
aeubanks at google.com
Thu Jun 27 17:45:19 UTC 2019
Changeset: 2d331264b87c
Author: aeubanks
Date: 2019-06-26 08:42 -0700
URL: http://hg.openjdk.java.net/tsan/dev/rev/2d331264b87c
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 with 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 because the offset register was clobbered.
! src/hotspot/cpu/x86/templateTable_x86.cpp
! src/hotspot/share/runtime/sharedRuntime.cpp
! src/hotspot/share/runtime/sharedRuntime.hpp
More information about the tsan-dev
mailing list