[jdk11u-dev] RFR: 8229147: Linux os::create_thread() overcounts guardpage size with newer glibc (>=2.27)
Lutz Schmidt
lucy at openjdk.org
Wed Jul 19 14:01:01 UTC 2023
On Wed, 19 Jul 2023 09:12:27 GMT, Goetz Lindenmaier <goetz at openjdk.org> wrote:
>> This backport is for parity with 11.0.21-oracle.
>> Fix didn't apply at all, os/linux/os_linux.cpp was too different in particular.
>> I managed to create a working version by massaging and applying the changes manually.
>>
>> There is some risk involved. It is not caused by the intentional change of behavior but by potential collateral damage.
>>
>> Tests (SAP nightly test suite) do not indicate any issues.
>> Reviews pending.
>
> src/hotspot/os/linux/os_linux.cpp line 912:
>
>> 910:
>> 911: #if defined(__GLIBC__) // TLS not in jdk11
>> 912: static bool AdjustStackSizeForTLS = false; // Dumy decl as substitute for cmdline parameter
>
> AdjustStackSizeForTLS is declared under ifdef GLIBC, but
> the usage is not. Is this correct?
> I think the comment " // TLS not in jdk11" should go into a new line.
> Also, maybe we should make this "const" so it can be optimized?
Well,
I tried to keep the code around the usage of AdjustStackSizeForTLS as close to the original as possible. I was successful with that, but forgot about the protected declaration.
This did not pop up in the builds because we obviously always use glibc on linux platforms. Will fix.
-------------
PR Review Comment: https://git.openjdk.org/jdk11u-dev/pull/2035#discussion_r1268118387
More information about the jdk-updates-dev
mailing list