RFR: 8325647: [IR framework] Only prints stdout if exitCode is 134 [v2]
Tobias Hartmann
thartmann at openjdk.org
Wed May 14 07:53:50 UTC 2025
On Tue, 13 May 2025 16:03:09 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.
>
> Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision:
>
> Use Platform.isWindows
Looks good to me too.
-------------
Marked as reviewed by thartmann (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25200#pullrequestreview-2839142327
More information about the hotspot-compiler-dev
mailing list