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

Rotem, Nadav nadav.rotem at intel.com
Fri Mar 2 21:54:51 PST 2012


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). 

-----Original Message-----
From: lost [mailto:lostfreeman at gmail.com] 
Sent: Saturday, March 03, 2012 01:32
To: Rotem, Nadav; Yatsina, Marina; LLVM
Subject: Re: [LLVMdev] Access Violation using ExecutionEngine on 64-bit Windows 8 Consumer Preview

Hi Rotem,

Thank to you, and especially to Marina! The problem gone. I'm a bit interested, what is the reason it worked in Win7, and not in Win8.
I've recently used Process Explorer to discover, that the call was to ntdll.dll, which in Win8 is loaded to the totally different address.

Best regards,
Victor Milovanov
Moscow State University graduate student

2012/3/3 Rotem, Nadav <nadav.rotem at intel.com>:
> Hi Victor,
>
> Try this fix by Marina Yatsina:
>
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120220/1
> 37532.html
>
> Nadav
>
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] 
> On Behalf Of lost
> Sent: Friday, March 02, 2012 22:53
> To: NAKAMURA Takumi; LLVM
> Subject: Re: [LLVMdev] Access Violation using ExecutionEngine on 
> 64-bit Windows 8 Consumer Preview
>
> Hi, Takumi!
>
> I tried your patch, and it did not help. Moreover, I tried to compile under Windows 7 and copy files to Windows 8, and received the same exception. So the problem seems to be in Windows 8 itself or some non-portable code inside LLVM.
>
> Could anyone tell me what LLVM code in ExecutionEngine is responsible for allocating and protecting memory for generated native functions?
>
> Best regards,
> Victor Milovanov.
>
> 2012/3/2 NAKAMURA Takumi <geek4civic at gmail.com>:
>> Viktor, could you try my patch? I guess they are __chkstk.
>>
>> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120220/
>> 1
>> 37577.html
>>
>> ...Takumi
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu 
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
>
> This e-mail and any attachments may contain confidential material for 
> the sole use of the intended recipient(s). Any review or distribution 
> by others is strictly prohibited. If you are not the intended 
> recipient, please contact the sender and delete all copies.
>
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the llvm-dev mailing list