RFR: 8327647: Occasional SIGSEGV in markWord::displaced_mark_helper() for SPECjvm2008 sunflow [v4]
Matias Saavedra Silva
matsaave at openjdk.org
Fri Apr 26 20:22:50 UTC 2024
On Tue, 23 Apr 2024 15:32:19 GMT, Andrew Haley <aph at openjdk.org> wrote:
>>> So, I guess the loadload fence being inserted here is the one we need between [2] and [3].
>>
>> The way I would say it is we need a LoadLoad betwen [3] and [2] or between [3] and [1]. The code assumes that if it is a fast bytecode, then it can read [1] without checking [2] again.
>
> My confusion is because @dean-long said
>
> _If I understand correctly, the order of writes must be:
>
> ResolvedFieldEntry fields, except _get_code and _put_code
> _get_code, _put_code
> patch_bytecode(fast_bytecode)_
>
> therefore, if that ordering must be maintained, we'll need two store fences. And on the reading side, we'll need two load fences. If that total order is more than is necessary, OK.
@theRealAph @dean-long how about replacing the comment with this:
`// Prevents stale data from being read by another thread after the bytecode is patched to the fast bytecode`
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18477#issuecomment-2080065219
More information about the hotspot-compiler-dev
mailing list