I'd bet you're running into a stack-size limit. Check ulimit -s to see if you have a limit currently defined. If so, increase the limit or turn it off.
Stack size limits can be a bit tricky to diagnose since the segfault show the line where the variable was defined.
