delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/29/21:56:42

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199706300155.AA256125722@typhoon.rose.hp.com>
Subject: Re: gcc crashes...
To: combee AT cambridge DOT scr DOT slb DOT com (Leendert Combee)
Date: Sun, 29 Jun 1997 18:55:22 PDT
Cc: djgpp AT delorie DOT com
In-Reply-To: <199706292344.AAA05194@tartan.scr.slb.com>; from "Leendert Combee" at Jun 30, 97 12:44 (midnight)

> 
> 
>   I have this source file that I try to compile. I have no problem
>   under gcc/unix but with djgpp *and* optimisations (i.e., -O and higher)
>   cc1 crashes with a segmentation fault. If I omit -O (etc), my code
>   compiles. 
One thought could be you are overrunning stack.  On most unix systems
(OK, hp and linux at least, maybe others), the stack can grow at run time.
The more optimizations you specify the more stack is needed.  Try
stubedit'ing cc1.exe to as large a stack size as you can afford.

> Is this something that indeed can happen or could it
>   point to a bug? In that case I guess I need to run simify right
>   after gcc crashes so I can tell exactly where the sigsegv happens?
cc1.exe has probably been stripped so I doubt that would do any good.

>   BTW, I guess it could also point to a weird bug in the code I try
>   to compile?
Possibly, but unlikely.  If the stack fix doesn't work try compiling
with the -Q option.  This will print out function by function as
gcc goes along.  You should then be able to start deleting portions
of your source file down to isolate the offending code.

Andrew

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019