bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

One Program Always Triggers Segmentation Faults


From: Vale Group
Subject: One Program Always Triggers Segmentation Faults
Date: Thu, 10 Mar 2005 14:46:46 -0800

I have one program which has been exhibiting a problem for months.  The program
compiles and links without errors or warnings with gcc version 3.3.3. When I run
it in the gdb debugger, it always stops near the beginning with a segmentation
fault.  There appears to be a corruption of the heap memory; the point of
failure moves as I change the source code of the program.

The program (too large and proprietary to reproduce here) runs fine outside of
the gdb debugger.  It runs fine when compiled with Borland version 5.6.4. It
runs fine in the Borland Turbo Debugger.  Borland's Code Guard reports no memory
problems.

Here's the condensed output of a run with gdb:
$ gdb
GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)

(gdb) r
Program received signal SIGSEGV, Segmentation fault.
0xbff7a606 in KERNEL32!Heap32ListNext ()
   from /cygdrive/c/WINDOWS/SYSTEM/KERNEL32.DLL

(gdb) bt
#0  0xbff7a606 in KERNEL32!Heap32ListNext ()
   from /cygdrive/c/WINDOWS/SYSTEM/KERNEL32.DLL
#1  0x00000013 in ?? ()
#2  0x00e6813c in ?? ()
#3  0x00000012 in ?? ()
#4  0xffffffff in ?? ()
#5  0x00c2e890 in ?? ()
#6  0x81a71ad4 in ?? ()
#7  0x83d8d038 in ?? ()
#8  0xbffc05b4 in ?? () from /cygdrive/c/WINDOWS/SYSTEM/KERNEL32.DLL
#9  0xbff79260 in KERNEL32!BuildCommDCBAndTimeoutsA ()
   from /cygdrive/c/WINDOWS/SYSTEM/KERNEL32.DLL
#10 0x00000000 in ?? () from

(gdb) info threads
  3 thread -502221.0xfff65693  0xbff99b32 in SetThreadExecutionState ()
   from /cygdrive/c/WINDOWS/SYSTEM/KERNEL32.DLL
  2 thread -502221.0xfff7e84f  0x610997cc in sigfillset ()
   from /usr/bin/cygwin1.dll
* 1 thread -502221.0xfff60c9f  0xbff7a606 in KERNEL32!Heap32ListNext ()
   from /cygdrive/c/WINDOWS/SYSTEM/KERNEL32.DLL


The program will resume (with numerous segmentation faults) if I 'continue.'
The segmentation faults are always the same, "0xbff7a606 in
KERNEL32!Heap32ListNext ()."

Other programs run in the gdb debugger just fine.  The same results are observed
if I use the Insight interface to the gdb debugger. There is some nasty
interaction between this particular program and gdb.  I wish that I could tell
you what changed 5 or 6 months ago and brought on this behavior, but I can't.

I'm using the Windows 98SE operating system.  KERNEL32 is version 4.10.2222,
dated 4/23/99.  The Cygwin engine is version 1.5.13-1. There is only one version
of cygwin1.dll on my machine.

What path of investigation do you recommend that I take from here?

Chuck





reply via email to

[Prev in Thread] Current Thread [Next in Thread]