Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Program won't crash when it should

Name: Anonymous 2012-01-16 3:24

(GCC C)
I ran a pointer over each member of an integer array, storing one character of input in each cell.

The program seems to consistently crash when I try to store X+3 or more characters, where X is the size of the array, but if I do not exceed X+2 it will not crash.

Why does it crashes exactly at the point it does, but not for X+1 or X+2?

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-16 20:31

>>86
No you annoying stupid shit. All the standard states is that the implmentation must be such that its behavior corresponds to the C Abstract Machine. That means

One could never argue, for example, that a fwrite() which happens to write to a dying hard disk
is "underfined behavior", or that an auto int x; which happened to be allocated on a failing memory circuitry during execution is "undefined behavior".

Would be legal as long as the behavior of the implementation was the same as the C Abstract machine.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List