[PATCH]13217 thread apply all detach throws a SEGFAULT

Yao Qi yao@codesourcery.com
Mon Jan 14 15:25:00 GMT 2013


[Don't need to copy so many maintainers :)]

On 01/14/2013 09:38 PM, Bilal, Muhammad wrote:

> Actually when command "thread apply all detach" is applied then the function thread_apply_command (char *tidlist, int from_tty) in thread.c:1179 called a function init_thread_list (void)in thread.c:140
>
> which makes the 'thread_list' struck to null so when for (tp = thread_list; tp; tp = tp->next) loop in thread_apply_command (char *tidlist, int from_tty) in thread.c:1179 iterates 2nd time it throws a segmentation fault when try to access the bogus value of
>   thread_list
>
> so i have fixed this problem
>
> I have written the test case for it also
>

Bilal,
thanks for trying to fix the bug, and adding a test case for it.

> I have worked on gdb-7.5.50.20121127 snapshot

We work on GDB CVS trunk in the development.  You should re-generate 
your patch on the basis of GDB trunk.

The patch looks ill-formated, which prohibits maintainers giving a 
review.  Please read gdb/CONTRIBUTE to see how to submit a patch.

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list