From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5859 invoked by alias); 26 Sep 2012 11:50:18 -0000 Received: (qmail 5851 invoked by uid 22791); 26 Sep 2012 11:50:17 -0000 X-SWARE-Spam-Status: No, hits=-1.7 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; Wed, 26 Sep 2012 11:50:04 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1TGq7w-000288-CA from Ali_Anwar@mentor.com for gdb-patches@sourceware.org; Wed, 26 Sep 2012 04:50:04 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 26 Sep 2012 04:50:04 -0700 Received: from [137.202.157.121] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.1.289.1; Wed, 26 Sep 2012 12:50:02 +0100 Message-ID: <5062EB8A.2010002@codesourcery.com> Date: Wed, 26 Sep 2012 11:50:00 -0000 From: ali_anwar User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: Subject: Re: Updated patch for Bug 13217 - thread apply all detach throws a SEGFAULT References: <5062EA9B.1060505@codesourcery.com> In-Reply-To: <5062EA9B.1060505@codesourcery.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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: 2012-09/txt/msg00581.txt.bz2 On 09/26/2012 04:44 PM, ali_anwar wrote: > Fixed a formating issue... > > Attached patch is for Bug 13217 - "thread apply all detach throws a > SEGFAULT". > > Issue: > Segmentation fault was coming from invalid access to tp->* i.e > "tp->ptid". > > Fix: > Check if the thread is valid before we apply a command > Check for the thread count after executing a command on every thread > > Testing: > * Tested on powerpc-linux as well as i686-pc-linux > * Also checked with valgrind > > Test case: > Added a test case to test "thread apply all detach" command > > Regards, > -Ali > > My last patch was not recieved so please ignore the line "Fixed the formating issue...". -Ali