What is Vectored Exception Handling used for?

David Holmes david.holmes at oracle.com
Mon Nov 13 05:38:53 UTC 2023


Hi Julian,

On 13/11/2023 12:49 am, Julian Waters wrote:
>  From what I can tell, Vectored Exception Handling replaces Structured 
> Exception Handling (at least for some cases) on ARM64 Windows, and it 
> replaces Structured Exception Handling in thread_native_entry for 
> thread->call_run() and for calls to JNI_CreateJavaVM_inner 
> and jni_DestroyJavaVM_inner. But in the Vectored Exception Filter, it 
> only seems to work for faults that happen in the CodeCache, which 
> neither of the above cases (at least to my knowledge) are. The above 
> confuses me a little, what is Vectored Exception Handling used for 
> within HotSpot, since the few use cases for it aren't actually handled 
> by the Vectored Filter?

If the vectored handler doesn't handle it (and it only handles the 
codecache) then it passes up to the topLevelUnhandledExceptionFilter 
which calls report_error.

VEH was proposed for hotspot in place of SEH but it was rejected, but 
there is a good discussion of it:

https://bugs.openjdk.org/browse/JDK-8247941

However it is required for Windows-Aarch64

https://bugs.openjdk.org/browse/JDK-8248496

so came in for that port. It was also used by AOT at some point.

HTH,
David


> best regards,
> Julian


More information about the hotspot-dev mailing list