This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug Report: Illegal Instruction
- To: Bill <billl at unm dot edu>
- Subject: Re: Bug Report: Illegal Instruction
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 23 May 2000 23:52:50 -0300
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: Cygnus Solutions, a Red Hat Company
- References: <Pine.A41.4.21.0005231943560.125148-100000@pegasus.unm.edu>
On May 23, 2000, Bill <billl@unm.edu> wrote:
>> Could it be a buffer overflow problem?
>> I do not consider myself a buffer-knowledgable person, but I don't
>> think its a buffer overflow problem.
> Run it within a debugger and see how it crashes. If it's a totally
> strange address, odds are that you've inadvertently overwritten part
> of the stack by overrunning a fixed-size buffer.
> Glad to take suggestions on how to solve this. Really.
> I had previously ran it with a debugger (gdb 4.1.6). Here's the
> result:
> "Program received signal SIGILL, Illegal instruction.
> 0x0 in ?? () from /nfs/user/b/billl/test/notwork/TABLE
> (gdb)"
So it's very likely that you've somehow corrupted the stack, which was
already hinted at because moving part of the function into a separate
function altered the behavior.
I'd set a breakpoint in the method that fails to complete and run it
step-by-step, looking at the stack trace (`where') after each step.
When the stack trace breaks, you've found the culprit.
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me