I am getting SIGSEGV in alloca, what could be the cause ?

David Daney ddaney@avtrex.com
Tue Sep 11 17:59:00 GMT 2007


Mayank Kumar wrote:
> Hi
> With binutils 2.17 compiled programs on interix, I am sometimes getting crashes like
> 
> +++++++++++++++++++++++++++++++++++
> Program received signal SIGSEGV, Segmentation fault.
> 0x00405f57 in _alloca () at dfa.c:1777
> 1777                  pos[j] = lastpos[j];
> 
> +++++++++++++++++++++++++++++++++++
> 
> Is it because the program is running out of stack space or is there some other reason.
> The crash occurs when that 2.17 linked binary is run. This occurs for some programs
> Only and not always. Any pointers in this area  would be helpful. I am trying to
> Compile GNU packages only.

Your debugger should allow you to examine registers and code so you can 
figure out which address caused the fault.  If it is near a page 
boundary on the stack, a stack overflow would be indicated.

David Daney



More information about the Binutils mailing list