From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20507 invoked by alias); 2 Aug 2012 16:08:23 -0000 Received: (qmail 20496 invoked by uid 22791); 2 Aug 2012 16:08:21 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Aug 2012 16:08:07 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q72G86L2029098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 2 Aug 2012 12:08:06 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q72G85BT018881 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 2 Aug 2012 12:08:06 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Subject: RFC: missing do_cleanups call in dwarf2_frame_cache Date: Thu, 02 Aug 2012 16:08:00 -0000 Message-ID: <87vch1qntm.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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-08/txt/msg00074.txt.bz2 While debugging a different problem, I found a spot in dwarf2_frame_cache that fails to call do_cleanups before returning. The usual rule is that ordinary functions should not leave any dangling cleanups. Built and regtested on x86-64 Fedora 16. Tom * dwarf2-frame.c (dwarf2_frame_cache): Call do_cleanups before return. --- gdb/dwarf2-frame.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 01786ef..741a103 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -1110,6 +1110,7 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache) if (ex.error == NOT_AVAILABLE_ERROR) { cache->unavailable_retaddr = 1; + do_cleanups (old_chain); return cache; } -- 1.7.7.6