[jdk24u] RFR: 8352946: SEGV_BND signal code of SIGSEGV missing from our signal-code table
Thomas Stuefe
stuefe at openjdk.org
Wed Apr 2 16:11:48 UTC 2025
On Wed, 2 Apr 2025 15:38:22 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> Hmm, okay.
>>
>> That means that when we build on an older machine, and Linux kernels change the constant in newer kernel releases, we may use the wrong number.
>>
>> What I would do is this:
>>
>>
>> #define SEGV_BNDERR_value 3
>> #if defined(SEGV_BNDERR)
>> STATIC_ASSERT(SEGV_BNDERR == SEGV_BNDERR_value)
>> #else
>> #define SEGV_BNDERR SEGV_BNDERR_value
>> #endif
>>
>>
>> The static assert will alert us if we build on a newer Linux version and turns out we were wrong with our assumed number.
>
> Not sure if this is very likely , but who knows.
> I created https://bugs.openjdk.org/browse/JDK-8353568
Why a new bug, why not just do it as part of this PR? Am I missing something?
> Not sure if this is very likely , but who knows.
It can happen. With signal definitions I agree, very unlikely. But I had a bug last year with mmap constants (you'd think they never change once defined, too) where Oracle Linux changed those constants downstream in their kernel, and that caused errors at customers.
-------------
PR Review Comment: https://git.openjdk.org/jdk24u/pull/175#discussion_r2025168510
More information about the jdk-updates-dev
mailing list