Integrated: 8295974: jni_FatalError and Xcheck:jni warnings should print the native stack when there are no Java frames

David Holmes dholmes at openjdk.org
Tue Jan 3 04:25:56 UTC 2023


On Fri, 16 Dec 2022 07:07:06 GMT, David Holmes <dholmes at openjdk.org> wrote:

> If a JNI Fatal error, or a JNI warning (from Xcheck:jni) is triggered in "top-level" native code (such as the launcher itself, or a freshly attached native thread) then there is no stack printed as there are no Java frames. This enhancement changes that so that we print the native stack, similarly to how error reporting does. We reuse VMError::print_native _stack to do this, but it could be argued this should be moved to a more general purpose utility class - suggestions welcome.
> 
> Testing:
>   - manual fault injection (see bug report)
>   - tiers 1-4
> 
> Thanks.

This pull request has now been integrated.

Changeset: 37574333
Author:    David Holmes <dholmes at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/375743336dc15f9f945a03422eaa7ff773622cd8
Stats:     230 lines in 6 files changed: 213 ins; 9 del; 8 mod

8295974: jni_FatalError and Xcheck:jni warnings should print the native stack when there are no Java frames

Reviewed-by: coleenp, rehn, sspitsyn

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

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


More information about the hotspot-dev mailing list