RFR: 8341413: Stop including osThread_os.hpp in the middle of the OSThread class
David Holmes
dholmes at openjdk.org
Thu Oct 3 08:38:35 UTC 2024
On Thu, 3 Oct 2024 05:51:51 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
> Even though I am not sure about the usefulness of `AllocFailStrategy::RETURN_NULL`, and whether if it is ever recoverable to fail (smallish) native allocations in Hotspot. Seems like we will crash very soon in any case.
True. The problem with allocations within the constructor is that we have no way to convey to the caller that we had a failure. So if allocation of OSThread fails we act like it is non-fatal because we can just throw a Java exception from `Thread.start`. But if the constructor fails to construct things properly we have no mechanism to communicate that so we abort on internal allocation failures.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21306#issuecomment-2390837274
More information about the graal-dev
mailing list