public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug threads/13217] New: thread apply all detach throws a SEGFAULT
@ 2011-09-22  9:59 kevin.pouget at gmail dot com
  2011-09-22 15:28 ` [Bug threads/13217] " kevin.pouget at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kevin.pouget at gmail dot com @ 2011-09-22  9:59 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13217

             Bug #: 13217
           Summary: thread apply all detach throws a SEGFAULT
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: threads
        AssignedTo: unassigned@sourceware.org
        ReportedBy: kevin.pouget@gmail.com
    Classification: Unclassified


thread apply all detach throws a SEGFAULT, because

thread.c:thread_apply_all_command
  for (tp = thread_list; tp; tp = tp->next)

is not robust against thread_list modification during the loop.


The reason behind this strange-looking command is when you have multiple
(single-threaded) inferiors and you want to detach all of them, there is no
`inferior apply all detach`

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug threads/13217] thread apply all detach throws a SEGFAULT
  2011-09-22  9:59 [Bug threads/13217] New: thread apply all detach throws a SEGFAULT kevin.pouget at gmail dot com
@ 2011-09-22 15:28 ` kevin.pouget at gmail dot com
  2013-07-15 11:14 ` cvs-commit at gcc dot gnu.org
  2013-07-15 18:29 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: kevin.pouget at gmail dot com @ 2011-09-22 15:28 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13217

Kevin Pouget <kevin.pouget at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kevin.pouget at gmail dot
                   |                            |com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug threads/13217] thread apply all detach throws a SEGFAULT
  2011-09-22  9:59 [Bug threads/13217] New: thread apply all detach throws a SEGFAULT kevin.pouget at gmail dot com
  2011-09-22 15:28 ` [Bug threads/13217] " kevin.pouget at gmail dot com
@ 2013-07-15 11:14 ` cvs-commit at gcc dot gnu.org
  2013-07-15 18:29 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-07-15 11:14 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13217

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    alianwar@sourceware.org    2013-07-15 11:14:32

Modified files:
    gdb            : ChangeLog thread.c 
    gdb/testsuite/gdb.threads: threadapply.exp 

Log message:
    2013-07-15  Ali Anwar  <ali_anwar@codesourcery.com>

    PR threads/13217
    * thread.c (thread_apply_all_command): Check for valid threads
    and thread count.
    (thread_array_cleanup): New struct.
    (set_thread_refcount): New function.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15797&r2=1.15798
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/thread.c.diff?cvsroot=src&r1=1.154&r2=1.155
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.threads/threadapply.exp.diff?cvsroot=src&r1=1.16&r2=1.17

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug threads/13217] thread apply all detach throws a SEGFAULT
  2011-09-22  9:59 [Bug threads/13217] New: thread apply all detach throws a SEGFAULT kevin.pouget at gmail dot com
  2011-09-22 15:28 ` [Bug threads/13217] " kevin.pouget at gmail dot com
  2013-07-15 11:14 ` cvs-commit at gcc dot gnu.org
@ 2013-07-15 18:29 ` tromey at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2013-07-15 18:29 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13217

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |tromey at redhat dot com
         Resolution|---                         |FIXED
   Target Milestone|---                         |7.7

--- Comment #2 from Tom Tromey <tromey at redhat dot com> ---
I believe this was fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-15 18:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22  9:59 [Bug threads/13217] New: thread apply all detach throws a SEGFAULT kevin.pouget at gmail dot com
2011-09-22 15:28 ` [Bug threads/13217] " kevin.pouget at gmail dot com
2013-07-15 11:14 ` cvs-commit at gcc dot gnu.org
2013-07-15 18:29 ` tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).