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

David Majnemer david.majnemer at gmail.com
Thu Jan 29 08:36:45 PST 2015


I'm a little confused here.

The symbols `__alloca` and `__chkstk` come from a DLL which means that referring to them goes to a thunk which will then dereference `__imp__chkstk` and `__imp__alloca`.  The thunks are built by the linker which means that they **must** be accessible to your EXE or DLL regardless how far away you are from the C runtime's DLL.

I guess my first question would be, how does the symbol for `__chkstk` work out when running on the JIT? Do we literally find out where the CRT's `__chkstk` function is in memory and use that address? If so, how about we say that these calls should be indirect if we are using `CodeModel::Large` ?


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