[jdk17u-dev] RFR: 8295974: jni_FatalError and Xcheck:jni warnings should print the native stack when there are no Java frames

Martin Doerr mdoerr at openjdk.org
Sat May 6 21:08:41 UTC 2023


Oracle backported this helpful feature: [JDK-8295974](https://bugs.openjdk.org/browse/JDK-8295974). We should have it, too.

The original change doesn't apply cleanly:
Manual integration of JtregNativeHotspot.gmk and vmError.hpp was easy.
JavaThread files don't exist in 17u. I had to integrate into thread.hpp/cpp and take JavaThread::print_jni_stack() from upstream. I have removed the Loom/vthread related parts. Also removed the print_source_info and max stack parameters for print_native_stack which aren't used in 17u.
Added the required parts of [JDK-8292674](https://bugs.openjdk.org/browse/JDK-8292674) in 2nd commit. That one is not backported because it contains code for Loom.

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

Commit messages:
 - Add required parts of JDK-8292674.
 - Backport 3757433

Changes: https://git.openjdk.org/jdk17u-dev/pull/1328/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=1328&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8295974
  Stats: 238 lines in 9 files changed: 226 ins; 6 del; 6 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/1328.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/1328/head:pull/1328

PR: https://git.openjdk.org/jdk17u-dev/pull/1328


More information about the jdk-updates-dev mailing list