[PATCH] Bug 18582 - Offset overflow on calling __chkstk and __alloca on x64

Benoit Belley benoit.belley at autodesk.com
Thu Jan 29 06:45:30 PST 2015


I believe that this should be performed in all memory models.

In fact, I now believe that it is probably also affecting non-JIT usage. Windows 8 and 10 performs some address space randomization (DLL loading and memory allocations), probably for security reasons. This makes it more likely to that an inter-DLL function call is located more than 2GB away. 32-bit PC relative relocation cannot be used to perform an inter-DLL function call (unless going through the PLT). This is true for all memory models.

The __chkstk function is an inter-DLL/JIT-module function call (unless one is linking statically to the MSVC runtime, which we can't safely assume while compiling...). So, we need to use a 64-bit safe relocation for this call...


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D6856

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list