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
Mon Oct 27 02:59:01 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.

If we only the print the stack up to the signal handler, and not all the way to the allocation, then won't the resulting stack trace be confusing for the reader?

> The problem is code called from a signal handler, like SharedRuntime::handle_unsafe_access(), can call os::malloc(), 

Yeah and it really should not do that. :(

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

PR Comment: https://git.openjdk.org/jdk/pull/27985#issuecomment-3449310485


More information about the hotspot-runtime-dev mailing list