From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15945 invoked by alias); 14 Dec 2004 18:16:30 -0000 Mailing-List: contact rda-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: rda-owner@sources.redhat.com Received: (qmail 15881 invoked from network); 14 Dec 2004 18:16:20 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 14 Dec 2004 18:16:20 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iBEIGAaX009340 for ; Tue, 14 Dec 2004 13:16:10 -0500 Received: from zenia.home.redhat.com (sebastian-int.corp.redhat.com [172.16.52.221]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iBEIG3r06371; Tue, 14 Dec 2004 13:16:04 -0500 To: Kevin Buettner Cc: rda@sources.redhat.com Subject: Re: [PATCH] thread-db.c: Avoid segfault by making sure that ``reg'' is initialized References: <20041118180240.69493a51@saguaro> <20041213142538.7dc600c7@ironwood.lan> From: Jim Blandy Date: Tue, 14 Dec 2004 18:16:00 -0000 In-Reply-To: <20041213142538.7dc600c7@ironwood.lan> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-q4/txt/msg00045.txt.bz2 Kevin Buettner writes: > On Thu, 18 Nov 2004 18:02:40 -0700 > Kevin Buettner wrote: > > > [Hopefully, this'll end up in the right list this time...] > > > > I've just committed the patch below. As indicated by the subject line, this > > patch prevents a segfault when thread_db_set_thread_reg() returns an > > uninitialized ``reg''. (This was happening on Fedora Core 2 due to lack of > > xregset support.) > > > > * thread-db.c (thread_db_set_thread_reg): Don't allow a successful > > return without first initializing ``reg''. > > This patch was wrong - I didn't look closely enough at the result of > applying a patch from a branch. Hopefully, this time I've applied the > correct fix... > > * thread-db.c (thread_db_get_thread_reg): Don't allow a successful > return without first initializing ``reg''. > (thread_db_set_thread_reg): Remove code intended to for > thread_db_get_thread_reg(). That's it --- no soup for you!