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)

David Holmes dholmes at openjdk.org
Wed Oct 29 05:04:02 UTC 2025


On Fri, 24 Oct 2025 23:09:20 GMT, Dean Long <dlong at openjdk.org> wrote:

> 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.

src/hotspot/os/posix/signals_posix.cpp line 575:

> 573:   // We are called from a signal handler, so stop the stack backtrace here.
> 574:   // See os::is_first_C_frame() in os::get_native_stack().
> 575:   os::FirstNativeFrameMark fnfm;

Won't this break stack-walking in hs_err file generation when we get a SEGV for example?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27985#discussion_r2471742737


More information about the hotspot-runtime-dev mailing list