This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH]13217 thread apply all detach throws a SEGFAULT
- From: Yao Qi <yao at codesourcery dot com>
- To: "Bilal, Muhammad" <Muhammad_Bilal at mentor dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 14 Jan 2013 23:24:19 +0800
- Subject: Re: [PATCH]13217 thread apply all detach throws a SEGFAULT
- References: <97B73E257CC18646B0B5D3DD77DCBDD158E8FD@EU-MBX-02.mgc.mentorg.com> <97B73E257CC18646B0B5D3DD77DCBDD158EBC9@EU-MBX-02.mgc.mentorg.com>
[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 (éå)