RFR: 8316746: Top of lock-stack does not match the unlocked object [v4]
Martin Doerr
mdoerr at openjdk.org
Thu Nov 2 16:54:04 UTC 2023
On Thu, 2 Nov 2023 16:06:49 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>> It took me quite a long journey to figure out that C2 OSR goes wrong only in the test "vmTestbase/nsk/jdi/StepEvent" because the interpreter fills the slots in a different order as expected by C2. (Interpreter and C1 don't care about it.)
>> I've reimplemented the search loop in `monitorenter`, improved comments and cleaned up the related code a bit. The test is passing with this change.
>
> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove wrong comment.
Thanks for the review! The old code simply reuses the first empty slot it finds (from top to bottom). That causes the order to be reversed if e.g. 2 slots are free and we lock 2 objects. The new code uses the free slot which is closer to the bottom first.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16406#issuecomment-1791109249
More information about the hotspot-runtime-dev
mailing list