Q: Should we use 64bit atomic in x86_64 patch_verified_entry code?
dean.long at oracle.com
dean.long at oracle.com
Thu Oct 6 08:16:49 UTC 2022
Hi Dmitry,
On 10/5/22 5:55 AM, Dmitry Samersoff wrote:
> Hello Everybody,
>
> I'm working on a crash that seems to be related to CMC[1] - the JVM
> crashes when a method become not re-entrant because a JavaThread
> executing a compiled method reaches an instruction partially-assembled
> during patching of verified entry point.
>
> In the void NativeJump::patch_verified_entry()
>
> we atomically patch first 4 bytes, then atomically patch 5th byte,
> then atomically patch first 4 bytes again.
>
> Is it better (from CMC point of view) to patch atomically 8 bytes
> at once?
>
Yes, I believe so. I was looking into exactly that recently, but I
don't have a reliable reproducer to demonstrate the problem. If you
have a reproducer, please share it, along with what hardware you can
reproduce it on, or go ahead and file a bug on bugs.openjdk.org with the
details.
thanks,
dl
> 1. http://cr.openjdk.java.net/~jrose/jvm/hotspot-cmc.html
>
> -Dmitry
>
More information about the hotspot-dev
mailing list