Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Something wrong in my program
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Chris Torek, post: 1696400"] The Standard does not say. Several "real world" systems rudely terminate your program with a SIGILL, often subsequently reported as an "Illegal instruction". This is rather misleading, as the actual machine instructions involved were entirely legal ("subtract N from stack pointer") -- it was the resulting stack overflow that was problematic. :-) A termination message of the form "this program tried to use more memory than you instructed me to allow it" would be considerably nicer. (On at least some of these systems, you can arrange to catch SIGILL signals on an alternate stack, and do something about it. Or, of course, you can just use malloc() instead of VLAs, but then you should free() the memory when you are done with it.) [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Something wrong in my program
Top