Stack size weirdness - would love an explanation!
Posted: Wed Apr 20, 2011 8:43 am
I discovered something really odd today:
My executables weren't built with a large enough stack size for some situations. Easy enough fix - just recompile with a larger stack. Did that, no more problems. What's confusing me is the symptoms:
Executable run by calling it from php under Apache - no problem. No error messages, correct results.
Same executable run on same machine with same parameters in same location from the command line (with full administrator privileges) - dies with a stack fault.
This machine is running Windows XP and Apache 2.2.
Executable run by calling it from php under IIS - kills the server.
Same executable run on same machine with same parameters in same location from the command line - dies with a stack fault.
Can anyone satisfy my curiosity as to how running an executable through Apache would somehow give it a bigger stack size?
My executables weren't built with a large enough stack size for some situations. Easy enough fix - just recompile with a larger stack. Did that, no more problems. What's confusing me is the symptoms:
Executable run by calling it from php under Apache - no problem. No error messages, correct results.
Same executable run on same machine with same parameters in same location from the command line (with full administrator privileges) - dies with a stack fault.
This machine is running Windows XP and Apache 2.2.
Executable run by calling it from php under IIS - kills the server.
Same executable run on same machine with same parameters in same location from the command line - dies with a stack fault.
Can anyone satisfy my curiosity as to how running an executable through Apache would somehow give it a bigger stack size?