So which line of code does it crash at?
–
brian beuningDec 1 '12 at 17:19

It crashes right on the { of main() on get_pc_thunk. eip = 0x804c67a <main+23>. Newer crashes happen on a movl $0x04, 0x4(%esp). Trying to access the stack at that address causes the segfault. Once in a while a process is instantiated with the stack being too short.
–
yaronkleDec 2 '12 at 8:36

Or constructors of global scope objects, which run before main() is called...
–
twalbergDec 5 '12 at 15:22

So your hello world program crashes when run from the shell? Will it do so without the large char[] allocation? Obvious questions would be if the same binary runs without crashing on a more modest, compatible-ABI, machine, and if you see crashes in off-the-shelf prebuilt programs. Also, have you tried a different compiler version?
–
Chris StrattonDec 5 '12 at 15:50

The default stack size 8Meg well above the 100K allocated in the example code. The crash happened once or twice in 500 runs. If the stack was too small it should have crashed every time.
–
yaronkleDec 12 '12 at 16:30