From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14501 invoked by alias); 2 Jan 2004 16:07:06 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14493 invoked from network); 2 Jan 2004 16:07:01 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 2 Jan 2004 16:07:01 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id BDDEF2B8F; Fri, 2 Jan 2004 11:06:49 -0500 (EST) Message-ID: <3FF59719.7020908@gnu.org> Date: Fri, 02 Jan 2004 16:07:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 MIME-Version: 1.0 To: Jeff Johnston Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA]: Fix do_cleanups if oldchain is NULL References: <3FE0C502.7020408@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-01/txt/msg00021.txt.bz2 > I recently solved a bug on the ia64 concerning cleanups. What was happening was that a cleanup list was being re-initialized to NULL inside a loop and later do_cleanups() was called. This caused the entire cleanup list to be run because the design is to run the list until the passed in cleanup is reached. This caused other errors when the stream being used was deleted, etc... > > This patch adds a check to do_my_cleanups() so no cleanups will be performed if the passed in chain is NULL. > > Ok to commit? (hmm, no one thought to review this while I was on hols :-() I think the bug is in the calling code, and not utils.c. That patch unfortunatly makes a fundamental change to the core of the cleanup code and there's no easy way of demonstrating that other callers aren't assuming that NULL implies do all cleanups. Andrew > -- Jeff J. > > 2003-12-17 Jeff Johnston > > * utils.c (do_my_cleanups): Don't do cleanups if old chain > passed in is NULL.