Please review this small fix. When thawing in the fast path, the top frame 
could be a runtime stub due to preempting on monitorenter. In the changes for 
JDK-8336845 I missed this, leading to a crash when dereferencing the nullptr 
returned by `f.cb()->as_nmethod_or_null()` in 
`ThawBase::remove_top_compiled_frame_from_chunk`.

I was able to reproduce the failure locally and verified it is now fixed. I did 
run into a pre-existing crash with Jetty (filed JDK-8368099). I also run all 
tests in java/lang/Thread/virtual stressing this path, tests Fuzz.java and 
TestVirtualThreads.java, plus extra mach5 tier testing.

Thanks,
Patricio

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

Commit messages:
 - fix ThawBase::remove_top_compiled_frame_from_chunk

Changes: https://git.openjdk.org/valhalla/pull/1603/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1603&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8368002
  Stats: 20 lines in 1 file changed: 9 ins; 7 del; 4 mod
  Patch: https://git.openjdk.org/valhalla/pull/1603.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1603/head:pull/1603

PR: https://git.openjdk.org/valhalla/pull/1603

Reply via email to