On Fri, 22 Aug 2025 18:31:33 GMT, Dan Heidinga <heidi...@openjdk.org> wrote:

>> The bail out and error logging needs to be done inside this function (as 
>> there might be more than one reason why `obj` is unsafe). 
>> 
>> This is an unrecoverable error -- the caller has already found a bad oop. We 
>> cannot just throw away this oop because there are other states that point to 
>> this oop.
>
> The existing error handling - to log and bail out - are 100% right.  We're 
> not throwing an exception so the caller still needs to unwind itself as well 
> and a `return false;` after the 
> `MetaspaceShared::unrecoverable_writing_error();` makes it more obvious how 
> the caller should handle it - it too should bail as early as it can

`MetaspaceShared::unrecoverable_writing_error()` will terminate the VM. So we 
will never return to the caller.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26375#discussion_r2294418224

Reply via email to