[LLVMdev] Access Violation using ExecutionEngine on 64-bit Windows 8 Consumer Preview

NAKAMURA Takumi geek4civic at gmail.com
Fri Mar 2 22:05:49 PST 2012


2012/3/3 Rotem, Nadav <nadav.rotem at intel.com>:
> On Windows, the LLVM JIT runner looks for the '_chkstk' symbol by enumerating all of the loaded DLLs.  On Win8, NTDLL.DLL (where _chkstk is defined) is found in a location that is more than 32bits bytes away from the jitted code.  Marina's patch changes the code that generates a call to '_chkstk' from PCREL32 (which uses a 32bit offset) to an indirect call (which uses a 64bit address from a register).

This issue was not only due to ntdll.dll. Potentially it could be on
"large-address-aware" with JIT.
I have missed to consider the case that JIT memory pool would not be
within 2GB area.

Marina's patch makes sense, chkstk in prologue insertion should be the
special case in codegen.

...Takumi




More information about the llvm-dev mailing list