I'm using gpc 20010115 on a Linux system. I'm having problems with a
program I've written which has recursive function calls, which I
thought may be down to blowing the stack.
If I run the program in gdb, when it crashes I can't get it to display
a backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x240804e7 in ?? ()
(gdb) bt
#0 0x240804e7 in ?? ()
Cannot access memory at address 0xbabffff5
So I compiled it with --stack-checking, and now it crashes much
earlier, with a segmentation fault on a 'var' statement. It's at about
20 levels of recursion, and the function only uses three of four
integers of local variables; uname -s tells me I have 8196k of stack,
so I'm puzzled as to why I'm blowing the stack, if indeed I am.
Is a SIGSEGV what you would expect to see as a result of turning on
stack checking? Are there any known problems in gpc in this area? Any
suggestions as to what I can do to investigate further?
Steve