RFR: 8253611: AArch64: Concurrency problems in JavaFrameAnchor
Andrew Haley
aph at redhat.com
Fri Sep 25 07:57:19 UTC 2020
On 25/09/2020 08:07, Aleksey Shipilev wrote:
> It looks that `_last_Java_sp` is additionally used as
> acquire/release flag that guards the rest of the state. Yet, the
> coding in `javaFrameAnchor_aarch64.hpp` is incorrect at least in one
> place:
>
> _last_Java_fp = src->_last_Java_fp;
> _last_Java_pc = src->_last_Java_pc;
> // Must be last so profiler will always see valid frame if has_last_frame() is true
> _last_Java_sp = src->_last_Java_sp;
>
> There should be `OrderAccess::release()` where the comment
> suggesting the ordering constraint actually is -- I believe that is
> a copy-paste error from x86. Other platforms have `release` thre.
OK, thanks.
After all these years! It wasn't an oversight. I have asked before
about where this actually matters, and no-one seemed to know and it
didn't seem to matter, so I never changed it. Is it really true that
there are threads racily accessing the JavaFrameAnchor? If so, I'd
expect more problems than just this.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-dev
mailing list