RFR: 8358725: RunThese30M: assert(nm->insts_contains_inclusive(original_pc)) failed: original PC must be in the main code section of the compiled method (or must be immediately following it)

Dean Long dlong at openjdk.org
Fri Oct 24 23:16:12 UTC 2025


The problem is code called from a signal handler, like SharedRuntime::handle_unsafe_access(), can call os::malloc(), and when NMT is enabled, we try to get a stack backtrace.  But os::get_native_stack() does not know how to walk through signal handler frames.

This fix introduces FirstNativeFrameMark to be used by the POSIX version of os::get_native_stack() to set a frame to stop at in the POSIX signal handler.

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

Commit messages:
 - remove added blank lines
 - sort includes
 - missing include
 - stop stack walk at signal handler

Changes: https://git.openjdk.org/jdk/pull/27985/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27985&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8358725
  Stats: 56 lines in 5 files changed: 54 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/27985.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27985/head:pull/27985

PR: https://git.openjdk.org/jdk/pull/27985


More information about the hotspot-runtime-dev mailing list