[RFR] Fix clobbered address passed to TSAN
Arthur Eubanks
aeubanks at google.com
Thu Jun 27 17:24:09 UTC 2019
On Thu, Jun 27, 2019 at 8:36 AM Arthur Eubanks <aeubanks at google.com> wrote:
>
>
> On Wed, Jun 26, 2019 at 6:37 PM Man Cao <manc at google.com> wrote:
>
>> I see the instrumentation for stores (iastore, lastore, ...) is moved
>> from pre-barrier to post-barrier. Is that intended?
>>
> Yes, just to be consistent and lower the risk of clobbered registers there
> as well.
>
Sorry, I misread your comment. These should be post-barrier, reverted.
>
>> A minor issue is that the comment for TSAN in TemplateTable::aaload()
>> could be updated.
>>
> Removed the comment since now it applies to all loads/stores.
>
>>
>> If the update is just for the above two issues, no need for another
>> webrev and looks good.
>>
>
>> However, I'm now a bit skeptical if TSAN read instrumentation in
>> TemplateTable::getfield_or_static() are still correct, as they all follow a
>> call to access_load_at(), which could invoke GC's read barrier and clobber
>> unknown number of registers. Our internal JDK8 TSAN works because there
>> were no read barrier in JDK8. Fortunately we at least have the
>> verify_oop_index() for checking now.
>>
> Good point. I'm not sure exactly how `noreg` works, but as you said,
> verify_oop_index() isn't complaining.
>
More information about the tsan-dev
mailing list