RFR: 8346378: Cannot use DllMain in libnet for static builds

Alan Bateman alanb at openjdk.org
Wed Dec 18 12:33:46 UTC 2024


On Tue, 17 Dec 2024 14:24:42 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> Well, apparently `atexit` hooks are also [called from the DLL entry point](https://learn.microsoft.com/en-us/cpp/build/run-time-library-behavior?view=msvc-170), so your change shouldn't change the behavior too much.
>> 
>> Most of the networking tests are under `TEST=jdk_net` (subset of tier2).
>
>> Well, apparently `atexit` hooks are also [called from the DLL entry point](https://learn.microsoft.com/en-us/cpp/build/run-time-library-behavior?view=msvc-170), so your change shouldn't change the behavior too much.
> 
> Indeed. The difference is basically in a theoretical scenario where the dll is unloaded at some other time than when the process exits. This is not that is happening with our launcher, and I doubt it would be possible to achieve in practice, since it is not a tested setup.
> 
>> Most of the networking tests are under `TEST=jdk_net` (subset of tier2).
> 
> Thanks! I'll run those as well.

@magicus   You need to give changes like this a few days to give maintainers in the area time to look at the changes. Daniel is very reviewer in his area but there are many others that maintain this code. Going forward, please wait a few days to give others a chance. Everything related to library loading and initializes need lots of eyes as these area where we've historically had issues.

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

PR Comment: https://git.openjdk.org/jdk/pull/22788#issuecomment-2551201018


More information about the net-dev mailing list