From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2056 invoked by alias); 14 Jan 2013 15:25:24 -0000 Received: (qmail 2038 invoked by uid 22791); 14 Jan 2013 15:25:22 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Jan 2013 15:25:09 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TuluO-0004M8-Ft from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Mon, 14 Jan 2013 07:25:08 -0800 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 14 Jan 2013 07:25:08 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Mon, 14 Jan 2013 07:25:06 -0800 Message-ID: <50F42323.4050001@codesourcery.com> Date: Mon, 14 Jan 2013 15:25:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: "Bilal, Muhammad" CC: "gdb-patches@sourceware.org" 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> In-Reply-To: <97B73E257CC18646B0B5D3DD77DCBDD158EBC9@EU-MBX-02.mgc.mentorg.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 X-SW-Source: 2013-01/txt/msg00275.txt.bz2 [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 (齐尧)