public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/10909] New: segfault when STARTUP_WITH_SHELL = 0, in breakup_args.
@ 2009-11-05 14:58 scott dot sourceware dot 2009 at scottrix dot co dot uk
  2009-11-05 14:59 ` [Bug gdb/10909] " scott dot sourceware dot 2009 at scottrix dot co dot uk
  2009-11-05 21:22 ` tromey at redhat dot com
  0 siblings, 2 replies; 4+ messages in thread
From: scott dot sourceware dot 2009 at scottrix dot co dot uk @ 2009-11-05 14:58 UTC (permalink / raw)
  To: gdb-prs

Setting STARTUP_WITH_SHELL to 0 in inferior.h means that gdb segfaults when
trying to run a program with arguments.  This is because of the code:

-      cp = strchr (cp, ' ');
-      if (cp == NULL)
-  cp = strchr (cp, '\t');
-      if (cp == NULL)
-  cp = strchr (cp, '\n');

Which is clearly broken.  While google I found a post which suggests this
problem has been there since at least 5.3 !!!.  I will attach a suggested patch.

-- 
           Summary: segfault when STARTUP_WITH_SHELL = 0, in breakup_args.
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: scott dot sourceware dot 2009 at scottrix dot co dot uk
                CC: gdb-prs at sourceware dot org


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/10909] segfault when STARTUP_WITH_SHELL = 0, in breakup_args.
  2009-11-05 14:58 [Bug gdb/10909] New: segfault when STARTUP_WITH_SHELL = 0, in breakup_args scott dot sourceware dot 2009 at scottrix dot co dot uk
@ 2009-11-05 14:59 ` scott dot sourceware dot 2009 at scottrix dot co dot uk
  2009-11-05 21:22 ` tromey at redhat dot com
  1 sibling, 0 replies; 4+ messages in thread
From: scott dot sourceware dot 2009 at scottrix dot co dot uk @ 2009-11-05 14:59 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From scott dot sourceware dot 2009 at scottrix dot co dot uk  2009-11-05 14:59 -------
Created an attachment (id=4362)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4362&action=view)
Patch to fix segfault in breakup_args (fork-child.c)


-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/10909] segfault when STARTUP_WITH_SHELL = 0, in breakup_args.
  2009-11-05 14:58 [Bug gdb/10909] New: segfault when STARTUP_WITH_SHELL = 0, in breakup_args scott dot sourceware dot 2009 at scottrix dot co dot uk
  2009-11-05 14:59 ` [Bug gdb/10909] " scott dot sourceware dot 2009 at scottrix dot co dot uk
@ 2009-11-05 21:22 ` tromey at redhat dot com
  1 sibling, 0 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2009-11-05 21:22 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2009-11-05 21:22 -------
Please submit patches to the gdb-patches list.
See the contributing instructions:
http://sourceware.org/gdb/contribute/

I looked briefly at this patch.  Instead of using strchr I think
it should just use an ordinary loop looking for the next separator.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/10909] segfault when STARTUP_WITH_SHELL = 0, in breakup_args.
       [not found] <bug-10909-4717@http.sourceware.org/bugzilla/>
@ 2011-09-10 11:06 ` pedro at codesourcery dot com
  0 siblings, 0 replies; 4+ messages in thread
From: pedro at codesourcery dot com @ 2011-09-10 11:06 UTC (permalink / raw)
  To: gdb-prs

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

Pedro Alves <pedro at codesourcery dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-09-09
                 CC|                            |pedro at codesourcery dot
                   |                            |com
     Ever Confirmed|0                           |1

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

end of thread, other threads:[~2011-09-09 16:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-05 14:58 [Bug gdb/10909] New: segfault when STARTUP_WITH_SHELL = 0, in breakup_args scott dot sourceware dot 2009 at scottrix dot co dot uk
2009-11-05 14:59 ` [Bug gdb/10909] " scott dot sourceware dot 2009 at scottrix dot co dot uk
2009-11-05 21:22 ` tromey at redhat dot com
     [not found] <bug-10909-4717@http.sourceware.org/bugzilla/>
2011-09-10 11:06 ` pedro at codesourcery 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).