RFR: 8325647: [IR framework] Only prints stdout if exitCode is 134

Marc Chevalier mchevalier at openjdk.org
Tue May 13 11:31:04 UTC 2025


On Linux, `assert` and such eventually use `abort` which give the return code 134 (128 + 6 (code of SIGABRT/SIGIOT)). On Windows, dying returns `-1` (exit code are more-or-less-signed int on Windows):

https://github.com/openjdk/jdk/blob/2b3254160933e8b11527f801507a9c01b90d22b0/src/hotspot/os/windows/os_windows.cpp#L1382-L1384

So let's make the IR framework aware of this: we consider there was a JVM error if the OS is windows and the return code -1, or if it's 134 otherwise. I'm not sure what's the most idiomatic/robust way to check whether we are on Windows or not, but it's not customer code: it just needs to work for testing.

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

Commit messages:
 - Correctly detect JVM errors on windows

Changes: https://git.openjdk.org/jdk/pull/25200/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25200&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8325647
  Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/25200.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25200/head:pull/25200

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


More information about the hotspot-compiler-dev mailing list