RFR: 8317132: Prepare HotSpot for permissive-
    Jorn Vernee 
    jvernee at openjdk.org
       
    Fri Sep 29 15:20:58 UTC 2023
    
    
  
On Fri, 29 Sep 2023 02:00:23 GMT, Julian Waters <jwaters at openjdk.org> wrote:
>> src/hotspot/os/windows/os_windows.cpp line 2912:
>> 
>>> 2910: #if defined(USE_VECTORED_EXCEPTION_HANDLING)
>>> 2911: LONG WINAPI topLevelUnhandledExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
>>> 2912:   if (InterceptOSException) {
>> 
>> I may be missing something, but why not just use `if (!InterceptOSException)` here and get rid of the `goto`?
>
> This decision was based on a review comment in https://github.com/openjdk/jdk/pull/15096, which preferred keeping InterceptOSException without the negation. Perhaps I'll wait until Thomas sees this Pull Request
Okay. If an early bailout is desirable, I suggest instead putting everything in the `else` block into a helper method, and then have `if (InterceptOSException) return;` at the start. `topLevelUnhandledExceptionFilter` can then do:
helper(exceptionInfo); // or whatever name is chosen
return previousUnhandledExceptionFilter ? previousUnhandledExceptionFilter(exceptionInfo) : EXCEPTION_CONTINUE_SEARCH;
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15955#discussion_r1341483868
    
    
More information about the hotspot-runtime-dev
mailing list