RFR: 8325647: [IR framework] Only prints stdout if exitCode is 134
Christian Hagedorn
chagedorn at openjdk.org
Tue May 13 11:41:57 UTC 2025
On Tue, 13 May 2025 08:03:21 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
> 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.
Thanks for fixing this!
test/hotspot/jtreg/compiler/lib/ir_framework/driver/TestVMProcess.java line 262:
> 260: String stdErr = oa.getStderr();
> 261: String stdOut = "";
> 262: boolean osIsWindows = System.getProperty("os.name").toLowerCase().contains("windows");
You can use `Platform.isWindows()` instead.
-------------
Changes requested by chagedorn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25200#pullrequestreview-2836396502
PR Review Comment: https://git.openjdk.org/jdk/pull/25200#discussion_r2086611206
More information about the hotspot-compiler-dev
mailing list