[master] RFR: Parallel: fix size_given_klass

Axel Boldt-Christmas aboldtch at openjdk.org
Tue Apr 23 11:53:39 UTC 2024


On Tue, 23 Apr 2024 11:45:13 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> The Parallel scavenge threads compete to copy and forward objects, and the winning object is the one that managed to update the the forwarding pointer. For Lilliput, this code needs to be extra carefully written because installing the forwarding pointer destroys the klass pointer. The threads need to read the object header once, and then use that information when figuring out the size of the object. The code has been changed to do this, but there's a place in an assert were the code tries to reread the klass pointer, and then crash because it has been racingly been overwritten by another thread.
> 
> I had an idea that we could fix this by simplifying the assert with #149, but that has a problem with self-forwarded objects. There are ways to fix the problem listed in that PR, but for now the suggestion is to just make sure that the asserting code doesn't reread the klass pointer.

lgtm.

-------------

Marked as reviewed by aboldtch (Committer).

PR Review: https://git.openjdk.org/lilliput/pull/163#pullrequestreview-2017017785


More information about the lilliput-dev mailing list