From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29377 invoked by alias); 13 Jul 2013 21:13:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 29366 invoked by uid 89); 13 Jul 2013 21:13:02 -0000 X-Spam-SWARE-Status: No, score=-5.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sat, 13 Jul 2013 21:13:02 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6DLCpWx031293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 13 Jul 2013 17:12:51 -0400 Received: from bapiya (ovpn-113-23.phx2.redhat.com [10.3.113.23]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6DLCnbE021203 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 13 Jul 2013 17:12:50 -0400 From: Tom Tromey To: ali_anwar Cc: Joel Brobecker , Pedro Alves , Subject: Re: Updated patch for Bug 13217 - thread apply all detach throws a SEGFAULT References: <5062EA9B.1060505@codesourcery.com> <871uhnwkf3.fsf@fleche.redhat.com> <50C62BBB.6010404@codesourcery.com> <87hantek1p.fsf@fleche.redhat.com> <50C75319.9080903@codesourcery.com> <50C7628F.5080004@redhat.com> <51DD37FA.8010306@codesourcery.com> <87k3kyfgf1.fsf@fleche.redhat.com> <51DEA530.3020306@codesourcery.com> Date: Sat, 13 Jul 2013 21:13:00 -0000 In-Reply-To: <51DEA530.3020306@codesourcery.com> (ali anwar's message of "Thu, 11 Jul 2013 17:29:36 +0500") Message-ID: <878v1anoz2.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-07/txt/msg00339.txt.bz2 >>>>> "Ali" == ali anwar 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