This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Updated patch for Bug 13217 - thread apply all detach throws a SEGFAULT
- From: Tom Tromey <tromey at redhat dot com>
- To: ali_anwar <ali_anwar at codesourcery dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, Pedro Alves <palves at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Sat, 13 Jul 2013 15:12:49 -0600
- Subject: Re: Updated patch for Bug 13217 - thread apply all detach throws a SEGFAULT
- References: <5062EA9B dot 1060505 at codesourcery dot com> <871uhnwkf3 dot fsf at fleche dot redhat dot com> <50C62BBB dot 6010404 at codesourcery dot com> <87hantek1p dot fsf at fleche dot redhat dot com> <50C75319 dot 9080903 at codesourcery dot com> <50C7628F dot 5080004 at redhat dot com> <51DD37FA dot 8010306 at codesourcery dot com> <87k3kyfgf1 dot fsf at fleche dot redhat dot com> <51DEA530 dot 3020306 at codesourcery dot com>
>>>>> "Ali" == ali anwar <ali_anwar@codesourcery.com> writes:
Ali> Please find attached updated patch.
Thanks.
Ali> + struct thread_info **tp_array;
Ali> + struct thread_info *tp;
Ali> + int i, k;
Ali> + i = 0;
Either there should be a blank line between the declarations and the
assignment here, or the declaration should read "int i = 0, k;".
This patch is ok with this fixed.
I found out while reviewing this that thread refcounting is weird.
It is only checked in delete_thread_1, not at all what I was expecting :-)
Tom