[Bug 1171511] Re: seg fault when using auto completion for the condition command

Bug Watch Updater 1171511 at bugs.launchpad.net
Sun Apr 28 17:24:16 UTC 2013


Launchpad has imported 2 comments from the remote bug at
http://sourceware.org/bugzilla/show_bug.cgi?id=15413.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2013-04-28T16:32:23+00:00 Dave Gilbert wrote:

Hi,
  There is a trivially repeatable seg in condition_completer on head; this
was originally filed by Borim here; I as triaging it:

https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1171511

I've repeated this on CVS head; to trigger:

(Original reporter)
1. Start gdb with any program you want to debug
2. set a pending breakpoint, e.g. "b nofile.cxx:54"
3. type "condition 1" + Tab

This seems to come down to gdb/breakpoint.c:condition_completer which
has the code:


      ALL_BREAKPOINTS (b)
      {
1016    int single = b->loc->next == NULL;
        struct bp_location *loc;
        int count = 1;

        for (loc = b->loc; loc; loc = loc->next)
          {

That 'int single' line is where it segs because b->loc is NULL; I think
turning it into something like

  int single;
...
  single = (b->loc)?(b->loc->next==NEXT):1
would do it, but I've not really dug into the datastructure to check what else that might do.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1171511/comments/5

------------------------------------------------------------------------
On 2013-04-28T16:32:44+00:00 Dave Gilbert wrote:

oops, 
  single = (b->loc)?(b->loc->next==NULL):1

I meant.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1171511/comments/6


** Changed in: gdb
       Status: Unknown => Confirmed

** Changed in: gdb
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/1171511

Title:
  seg fault when using auto completion for the condition command

Status in GNU Debugger:
  Confirmed
Status in “gdb” package in Ubuntu:
  Triaged

Bug description:
  When hunting a bug in libreoffice, gdb crashed with a seg fault. After
  some testing following procedure leads to the crash:

  1. Start gdb with any program you want to debug
  2. set a pending breakpoint, e.g. "b nofile.cxx:54"
  3. type "condition 1" + Tab

  the core dump of the first crash is attached. I have some more core
  dumps, so if they are required I can upload them, too.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.10
  Package: gdb 7.5-0ubuntu2
  ProcVersionSignature: Ubuntu 3.5.0-27.46-generic 3.5.7.7
  Uname: Linux 3.5.0-27-generic x86_64
  ApportVersion: 2.6.1-0ubuntu10
  Architecture: amd64
  Date: Mon Apr 22 17:13:49 2013
  InstallationDate: Installed on 2012-12-22 (121 days ago)
  InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
  MarkForUpload: True
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=de_DE.UTF-8
   SHELL=/bin/bash
  SourcePackage: gdb
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb/+bug/1171511/+subscriptions




More information about the foundations-bugs mailing list