Hi!
Thank you for the hint. Still doesn't work.
I tried also executing the commands from an admin console, just in case,
but neither the link nor the -F option worked.
BTW the linker only worked with lower case
| cl -FC -Zi ..\code\Source.cpp user32.lib gdi32.lib /link /STACK:4194304
|
Also I can confirm that the linker is including this information
1
2
3
4
5
6
7
8
9
10
11
12
13 | Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40302 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
Source.cpp
Microsoft (R) Incremental Linker Version 12.00.40302.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:Source.exe
/debug
-STACK:4194304
Source.obj
user32.lib
gdi32.lib
|
The interesting part is that callstack in the crash shows this
| Win32Project1.exe!_chkstk() Line 99 Unknown
> Win32Project1.exe!__tmainCRTStartup() Line 618 C
|
I suspect the __chkstk() is some defense mechanism still enabled in windows.
If I don't specify the stack size, the crash is clearly an Stack overflow.