* Segfault on empty 'strace'
@ 2010-11-25 21:22 Marc Khouzam
2010-11-25 21:47 ` Pedro Alves
0 siblings, 1 reply; 4+ messages in thread
From: Marc Khouzam @ 2010-11-25 21:22 UTC (permalink / raw)
To: 'gdb-patches@sourceware.org'
Hi,
segfault on an empty 'strace' command.
The patch below checks for NULL before calling strncmp().
> ./gdb -ex strace
GNU gdb (GDB) 7.2.50.20101125-cvs
Segmentation fault
No regressions.
Ok?
What about 7_2?
Thanks
Marc
2010-11-25 Marc Khouzam <marc.khouzam@ericsson.com>
* breakpoint.c (is_marker_spec): Check for NULL.
### Eclipse Workspace Patch 1.0
#P src
Index: gdb/breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.516
diff -u -r1.516 breakpoint.c
--- gdb/breakpoint.c 11 Nov 2010 14:11:51 -0000 1.516
+++ gdb/breakpoint.c 25 Nov 2010 21:09:56 -0000
@@ -222,7 +222,7 @@
/* Assuming we're creating a static tracepoint, does S look like a
static tracepoint marker spec ("-m MARKER_ID")? */
#define is_marker_spec(s) \
- (strncmp (s, "-m", 2) == 0 && ((s)[2] == ' ' || (s)[2] == '\t'))
+ (s != NULL && strncmp (s, "-m", 2) == 0 && ((s)[2] == ' ' || (s)[2] == '\t'))
/* A reference-counted struct command_line. This lets multiple
breakpoints share a single command list. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Segfault on empty 'strace'
2010-11-25 21:22 Segfault on empty 'strace' Marc Khouzam
@ 2010-11-25 21:47 ` Pedro Alves
2010-11-25 23:28 ` Marc Khouzam
0 siblings, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2010-11-25 21:47 UTC (permalink / raw)
To: gdb-patches; +Cc: Marc Khouzam
On Thursday 25 November 2010 21:22:09, Marc Khouzam wrote:
> Ok?
> What about 7_2?
Okay for both, thanks.
This is PR12217. Would you mind mentioning it in the
in the changelog, and also in the cvs commit log?
Something like:
2010-11-25 Marc Khouzam <marc.khouzam@ericsson.com>
PR breakpoints/12217
* breakpoint.c (is_marker_spec): Check for NULL.
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Segfault on empty 'strace'
2010-11-25 21:47 ` Pedro Alves
@ 2010-11-25 23:28 ` Marc Khouzam
2010-11-25 23:35 ` Pedro Alves
0 siblings, 1 reply; 4+ messages in thread
From: Marc Khouzam @ 2010-11-25 23:28 UTC (permalink / raw)
To: Pedro Alves, gdb-patches
On Thursday 25 November 2010, Pedro Alves wrote:
> On Thursday 25 November 2010 21:22:09, Marc Khouzam wrote:
>
> > Ok?
> > What about 7_2?
>
> Okay for both, thanks.
>
> This is PR12217. Would you mind mentioning it in the
> in the changelog, and also in the cvs commit log?
> Something like:
>
> 2010-11-25 Marc Khouzam <marc.khouzam@ericsson.com>
>
> PR breakpoints/12217
>
> * breakpoint.c (is_marker_spec): Check for NULL.
Committed to HEAD and 7_2 with the changelog entry you suggested.
Can I leave the resolving of the PR to you? I don't know what
the process is.
Thanks
Marc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Segfault on empty 'strace'
2010-11-25 23:28 ` Marc Khouzam
@ 2010-11-25 23:35 ` Pedro Alves
0 siblings, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2010-11-25 23:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Marc Khouzam
On Thursday 25 November 2010 23:25:36, Marc Khouzam wrote:
> Committed to HEAD and 7_2 with the changelog entry you suggested.
> Can I leave the resolving of the PR to you? I don't know what
> the process is.
Just set the milestone and mark it resolved/fixed. I've done that now.
Thanks again.
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-25 23:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-25 21:22 Segfault on empty 'strace' Marc Khouzam
2010-11-25 21:47 ` Pedro Alves
2010-11-25 23:28 ` Marc Khouzam
2010-11-25 23:35 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox