Bug 435196 - SIGSEGV in gdb 6.7
Summary: SIGSEGV in gdb 6.7
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: rawhide
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-02-27 21:25 UTC by Greg Law
Modified: 2008-04-11 18:24 UTC (History)
0 users

Fixed In Version: gdb-6.8-1.fc9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-11 18:24:03 UTC
Type: ---
Embargoed:


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

Description Greg Law 2008-02-27 21:25:04 UTC
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 21:25:04 UTC
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 18:24:03 UTC
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.