public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/13218] New: GDB always segfaults on Linux 3.0 and ARM
@ 2011-09-22 20:53 johannespfau at gmx dot de
  2011-09-23 13:46 ` [Bug gdb/13218] " pedro at codesourcery dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: johannespfau at gmx dot de @ 2011-09-22 20:53 UTC (permalink / raw)
  To: gdb-prs

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

             Bug #: 13218
           Summary: GDB always segfaults on Linux 3.0 and ARM
           Product: gdb
           Version: 7.3
            Status: NEW
          Severity: critical
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: johannespfau@gmx.de
    Classification: Unclassified


Created attachment 5940
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5940
patch

Because of a bug in the get_linux_version function in the arm-linux-nat.c file,
gdb always segfaults. get_linux_version assumes that a linux kernel version
always has 3 version numbers (n.n.n) which is not true for the linux 3.0
kernel. In my case, the kernel version string is "3.0-ARCH". Because of that,
the third token returned by strtok is null, which causes the segfault.

Patch for gdb 7.3.1 attached.

-- 
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] 6+ messages in thread

* [Bug gdb/13218] GDB always segfaults on Linux 3.0 and ARM
  2011-09-22 20:53 [Bug gdb/13218] New: GDB always segfaults on Linux 3.0 and ARM johannespfau at gmx dot de
@ 2011-09-23 13:46 ` pedro at codesourcery dot com
  2011-10-10 17:22 ` uweigand at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pedro at codesourcery dot com @ 2011-09-23 13:46 UTC (permalink / raw)
  To: gdb-prs

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

Pedro Alves <pedro at codesourcery dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pedro at codesourcery dot
                   |                            |com

--- Comment #1 from Pedro Alves <pedro at codesourcery dot com> 2011-09-23 10:56:06 UTC ---
I'm not seeing where any of those os_FOO values are used.  Can we just garbage
collect all of that?

-- 
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] 6+ messages in thread

* [Bug gdb/13218] GDB always segfaults on Linux 3.0 and ARM
  2011-09-22 20:53 [Bug gdb/13218] New: GDB always segfaults on Linux 3.0 and ARM johannespfau at gmx dot de
  2011-09-23 13:46 ` [Bug gdb/13218] " pedro at codesourcery dot com
@ 2011-10-10 17:22 ` uweigand at gcc dot gnu.org
  2011-10-10 17:23 ` uweigand at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: uweigand at gcc dot gnu.org @ 2011-10-10 17:22 UTC (permalink / raw)
  To: gdb-prs

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

Ulrich Weigand <uweigand at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |uweigand at gcc dot gnu.org

--- Comment #2 from Ulrich Weigand <uweigand at gcc dot gnu.org> 2011-10-10 17:22:02 UTC ---
(In reply to comment #1)
> I'm not seeing where any of those os_FOO values are used.  Can we just garbage
> collect all of that?

Agreed.  This has been in since the beginning of CVS history, and was
apparently never used even then.

I'll prepare a patch to remove this routine.

-- 
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] 6+ messages in thread

* [Bug gdb/13218] GDB always segfaults on Linux 3.0 and ARM
  2011-09-22 20:53 [Bug gdb/13218] New: GDB always segfaults on Linux 3.0 and ARM johannespfau at gmx dot de
  2011-09-23 13:46 ` [Bug gdb/13218] " pedro at codesourcery dot com
  2011-10-10 17:22 ` uweigand at gcc dot gnu.org
@ 2011-10-10 17:23 ` uweigand at gcc dot gnu.org
  2011-10-10 18:49 ` cvs-commit at gcc dot gnu.org
  2011-10-10 18:53 ` uweigand at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: uweigand at gcc dot gnu.org @ 2011-10-10 17:23 UTC (permalink / raw)
  To: gdb-prs

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

Ulrich Weigand <uweigand at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware    |uweigand at gcc dot gnu.org
                   |dot org                     |

-- 
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] 6+ messages in thread

* [Bug gdb/13218] GDB always segfaults on Linux 3.0 and ARM
  2011-09-22 20:53 [Bug gdb/13218] New: GDB always segfaults on Linux 3.0 and ARM johannespfau at gmx dot de
                   ` (2 preceding siblings ...)
  2011-10-10 17:23 ` uweigand at gcc dot gnu.org
@ 2011-10-10 18:49 ` cvs-commit at gcc dot gnu.org
  2011-10-10 18:53 ` uweigand at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2011-10-10 18:49 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2011-10-10 18:47:53 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    uweigand@sourceware.org    2011-10-10 18:47:49

Modified files:
    gdb            : ChangeLog arm-linux-nat.c 

Log message:
    PR gdb/13218
    * arm-linux-nat.c (os_version, os_major, os_minor, os_release):
    Remove unused variables.
    (get_linux_version): Remove function.
    (_initialize_arm_linux_nat): Do not call it.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13410&r2=1.13411
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/arm-linux-nat.c.diff?cvsroot=src&r1=1.49&r2=1.50

-- 
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] 6+ messages in thread

* [Bug gdb/13218] GDB always segfaults on Linux 3.0 and ARM
  2011-09-22 20:53 [Bug gdb/13218] New: GDB always segfaults on Linux 3.0 and ARM johannespfau at gmx dot de
                   ` (3 preceding siblings ...)
  2011-10-10 18:49 ` cvs-commit at gcc dot gnu.org
@ 2011-10-10 18:53 ` uweigand at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: uweigand at gcc dot gnu.org @ 2011-10-10 18:53 UTC (permalink / raw)
  To: gdb-prs

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

Ulrich Weigand <uweigand at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Ulrich Weigand <uweigand at gcc dot gnu.org> 2011-10-10 18:52:47 UTC ---
Fixed.

-- 
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] 6+ messages in thread

end of thread, other threads:[~2011-10-10 18:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22 20:53 [Bug gdb/13218] New: GDB always segfaults on Linux 3.0 and ARM johannespfau at gmx dot de
2011-09-23 13:46 ` [Bug gdb/13218] " pedro at codesourcery dot com
2011-10-10 17:22 ` uweigand at gcc dot gnu.org
2011-10-10 17:23 ` uweigand at gcc dot gnu.org
2011-10-10 18:49 ` cvs-commit at gcc dot gnu.org
2011-10-10 18:53 ` uweigand at gcc dot gnu.org

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).