Bug 435196 - SIGSEGV in gdb 6.7
SIGSEGV in gdb 6.7
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
rawhide
All Linux
low Severity high
: ---
: ---
Assigned To: Jan Kratochvil
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-27 16:25 EST by Greg Law
Modified: 2008-04-11 14:24 EDT (History)
0 users

See Also:
Fixed In Version: gdb-6.8-1.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-11 14:24:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
fix for the problem as applied for soon-to-be-released gdb 6.8 (658 bytes, patch)
2008-02-27 16:25 EST, Greg Law
no flags Details | Diff

  None (edit)
Description Greg Law 2008-02-27 16:25:04 EST
gdb 6.7 has a bug which can cause random SIGSEGV's (in gdb itself).  The
simplest way to reproduce is within any active gdb session:

(gdb) flushregs
(gdb) print $pc

however, the bug can (theoretically at least)  bite pretty much any time.  The
fix is simple:

Index: gdb/regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.163
diff -u -r1.163 regcache.c
--- gdb/regcache.c	1 Jan 2008 22:53:12 -0000	1.163
+++ gdb/regcache.c	4 Feb 2008 22:24:32 -0000
@@ -472,6 +472,9 @@
   regcache_xfree (current_regcache);
   current_regcache = NULL;
 
+  /* Need to forget about any frames we have cached, too. */
+  reinit_frame_cache ();
+
   /* Force cleanup of any alloca areas if using C alloca instead of
      a builtin alloca.  This particular call is used to clean up
      areas allocated by low level target code which may build up


This fix has been applied for the soon-to-be released gdb-6.8 but remains in the
official 6.7 release.  See here for discussion of the issue and patch:

http://www.nabble.com/SIGSEGV-on-gdb-6.7*-tt15277232.html#a15277232
Comment 1 Greg Law 2008-02-27 16:25:04 EST
Created attachment 296125 [details]
fix for the problem as applied for soon-to-be-released gdb 6.8
Comment 2 Jan Kratochvil 2008-04-11 14:24:03 EDT
Verified as crashing on: gdb-6.7.1-5.fc9.x86_64
Verified as working  on: gdb-6.8-1.fc9.x86_64

Thanks for the report.

Note You need to log in before you can comment on or make changes to this bug.