[llvm-commits] Bug in "call __chkstak" on 64 bit OS

NAKAMURA Takumi geek4civic at gmail.com
Sun Feb 19 07:23:20 PST 2012


2012/2/20 NAKAMURA Takumi <geek4civic at gmail.com>:
> 2012/2/19 Yatsina, Marina <marina.yatsina at intel.com>:
>> The "__chkstk" function is in ntdll.dll. In my OS, the JIT is loaded to an address which is more than 2Gb away from the ntdll.dll, thus the call to this function fails. I will investigate other system calls as well. But regardless of other calls, this fix is needed.  The definition of W64ALLOCA (below) assumes that we use an i32 immediate, thus we can’t use it.
>
> In usual executable, __chkstk would be resolved as DLL IAT. You would
> not need to worry.
> In contrast, JIT might resolve __chkstk directly. IMO, you might tweak
> EE/JIT symbol resolver (and code emitter).

Er, x64's chkstk should be in ms runtime library, and referred from
explicit_symbols.inc. Why the resolver finds one in ntdll??

...Takumi




More information about the llvm-commits mailing list