JDK-8229780 : [AOT] Eliminate use of VectoredException with Windows AOT Libraries
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 14
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: windows
  • CPU: x86_64
  • Submitted: 2019-08-15
  • Updated: 2020-11-19
  • Resolved: 2020-11-19
Related Reports
Relates :  
Description
The use of Vectored Exceptions was added to handle the case where we get implicit exceptions in AOT generated DLLs on Windows.  This support is known to have problems but was added temporarily for the experimental Windows port of AOT.

One possible alternative is to investigate the feasibility of calling register_code_area with the regions in shared libraries that contain executable code.

Comments
WNF due to AOT being removed from Oracle JDK builds: JDK-8255616 Note, these issues are for Windows for which AOT was never officially supported.
19-11-2020

The problem with implicit exception in AOT DLLs on Windows is that the data structure used to register the code for these exceptions needs to be located within 2GB of the code. This is not the case and why we are using vectored exceptions at the moment. To fix this, we either need to stop using implicit exceptions in AOT libraries or I need to find a way of adding a DynamicCodeData structure to the generated library. // Structure containing the Windows Data Structures required // to register our Code Cache exception handler. // We put these in the CodeCache since the API requires // all addresses in these structures are relative to the Code // area registered with RtlAddFunctionTable. typedef struct { char ExceptionHandlerInstr[16]; // jmp HandleExceptionFromCodeCache RUNTIME_FUNCTION rt; UNWIND_INFO_EH_ONLY unw; } DynamicCodeData, *pDynamicCodeData;
04-12-2019