RFR: 8366925: Improper std::nothrow new expression in NativeHeapTrimmerThread ctor [v2]
duke
duke at openjdk.org
Tue Sep 16 06:58:23 UTC 2025
On Tue, 16 Sep 2025 01:00:01 GMT, Guanqiang Han <ghan at openjdk.org> wrote:
>> Please review this Patch.
>>
>> **Description:**
>> Add null check for _lock in NativeHeapTrimmerThread constructor. If allocation of the lock fails (_lock == nullptr), it indicates an out-of-memory condition. Since even this small allocation failed, it's unlikely that subsequent operations would succeed, so we terminate the JVM immediately.
>
> Guanqiang Han has updated the pull request incrementally with one additional commit since the last revision:
>
> Update trimNativeHeap.cpp
>
> remove std::nothrow and rely on the default new handling
@hgqxjj
Your change (at version 8e2df85f41fb13075e3da7e06645d6e62a15f3ca) is now ready to be sponsored by a Committer.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27275#issuecomment-3295984297
More information about the hotspot-runtime-dev
mailing list