Integrated: 8350111: [PPC] AsyncGetCallTrace crashes when called while handling SIGTRAP

Richard Reingruber rrich at openjdk.org
Thu Feb 27 09:26:59 UTC 2025


On Fri, 14 Feb 2025 16:11:55 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

> With this change `JavaThread::pd_get_top_frame_for_profiling()` fails if the current thread is found to be `_thread_in_Java` but the CodeCache does not contain its pc.
> 
> This will prevent crashes as described by the JBS item.
> 
> The fix might be too conservative for situations where a thread doen't change its thread state when calling native code, e.g. using the Foreign Function & Memory API. The difficulty finding a less defensive fix is that one must detect if a valid pc can be found in the caller's ABI before constructing that frame.
> 
> Testing:
> 
> * DaCapo Tomcat with async-profiler on a fastdebug build.
> * Tier 1-4 of hotspot and jdk on the main platforms and also on Linux/PPC64le and AIX.

This pull request has now been integrated.

Changeset: e4d3c97c
Author:    Richard Reingruber <rrich at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e4d3c97c0f388fc4b1684b78844f2166277ffd91
Stats:     10 lines in 1 file changed: 9 ins; 0 del; 1 mod

8350111: [PPC] AsyncGetCallTrace crashes when called while handling SIGTRAP

Reviewed-by: mdoerr, stuefe

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

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


More information about the hotspot-runtime-dev mailing list