-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unresolved __chkstk call #9
Comments
Hi @2Trepidatious ! Please share the code snippet, it will be easier for me to test. I will check it soon. |
You should be able to replicate it by taking any testing code you already have and just add a The solution is likely to just dynamically allocate something that large instead of putting it on the stack, but I figured it was worth documenting since it happens when the TOTAL size of a function's variables reach the page size and not just a single variable. The |
Actually, the above may not be fully true. Here is a better way to replicate the issue:
|
/GS- /Gs100000000 /STACK:0x100000,0x100000 |
When the size of all local variables for a function (combined) is greater than the stack page size (4k bytes for x86, 8k bytes for x64) a compiler routine adds a call to
__chkstk
to the code. This causes a linking error where__chkstk
isn't resolved.The text was updated successfully, but these errors were encountered: