From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5301 invoked by alias); 11 Aug 2003 13:30:42 -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 5279 invoked from network); 11 Aug 2003 13:30:31 -0000 Received: from unknown (HELO miranda.se.axis.com) (193.13.178.2) by sources.redhat.com with SMTP; 11 Aug 2003 13:30:31 -0000 Received: from axis.com (ironmaiden.se.axis.com [10.13.8.120]) by miranda.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id h7BDUSrG032721 for ; Mon, 11 Aug 2003 15:30:28 +0200 Message-ID: <3F379A74.4080508@axis.com> Date: Mon, 11 Aug 2003 13:30:00 -0000 From: Orjan Friberg Organization: Axis Communications User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: CRIS port; frame cleanup crash Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-08/txt/msg00177.txt.bz2 After a long overdue update of my gdb cvs tree, I found that something broke late March/early April. I don't quite understand what goes on, but it seems to happen the first time a frame allocated by deprecated_frame_xmalloc_with_cleanup is freed by do_cleanups (which happens in cris_skip_prologue_main). gdb segfaults on a call to free with a pointer to that frame. The arm-tdep.c file contains the same construct of: old_chain = make_cleanup (null_cleanup, NULL); frame = deprecated_frame_xmalloc_with_cleanup (..., ...) do_cleanups (old_chain); The only thing I found that looked suspicous was that the frame variable is allocated by a call to obstack_alloc, but free'd with a "normal" call to free. I would have guessed it should be with obstack_free, but then again, my understanding of what happens is limited so far. Any pointers or suggestions are appreciated. -- Orjan Friberg Axis Communications