This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/10909] New: segfault when STARTUP_WITH_SHELL = 0, in breakup_args.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]