RFR: 8316746: Top of lock-stack does not match the unlocked object

Martin Doerr mdoerr at openjdk.org
Thu Oct 26 20:45:33 UTC 2023


On Tue, 24 Oct 2023 12:19:04 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> In case of OSR compilations, `map()->peek_monitor_obj()` may return the objects in wrong order. We should use the popped object. I'm not changing the code for `LM_LEGACY`. That may be done separately.
> Note that C1 uses the popped object, too: `case Bytecodes::_monitorexit    : monitorexit (apop(), s.cur_bci());`
> 
> This PR is not complete: A lot of C2 code uses the BoxLock. Ideas to solve that are welcome! I think we should get rid of these nodes in the long term because they are only really needed by `LM_LEGACY`.
> The vmTestbase/nsk/jdi/StepEvent tests are passing stable on x64 and ppc64.

Btw. thanks a lot for looking at my reproducer and your time! I've fixed it as you suggested and now it's only failing on PPC64. I'll check the interpreter. In the long term, I'd still appreciate to get this changed and the BoxLock removed.

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

PR Comment: https://git.openjdk.org/jdk/pull/16345#issuecomment-1781867117


More information about the hotspot-compiler-dev mailing list