From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18189 invoked by alias); 21 Mar 2011 17:25:06 -0000 Received: (qmail 18082 invoked by uid 22791); 21 Mar 2011 17:25:03 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate3.uk.ibm.com (HELO mtagate3.uk.ibm.com) (194.196.100.163) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Mar 2011 17:24:51 +0000 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p2LHOkQ6002228 for ; Mon, 21 Mar 2011 17:24:46 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p2LHPCia1744972 for ; Mon, 21 Mar 2011 17:25:12 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p2LHOkEp017289 for ; Mon, 21 Mar 2011 11:24:46 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p2LHOjEk017286; Mon, 21 Mar 2011 11:24:45 -0600 Message-Id: <201103211724.p2LHOjEk017286@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 21 Mar 2011 18:24:45 +0100 Subject: [commit] Fix tramp-frame.c crash (Re: graceful unwind termination when we'd need unavailable/uncollect memory or registers to unwind further) To: pedro@codesourcery.com (Pedro Alves) Date: Mon, 21 Mar 2011 17:46:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <201102221834.42413.pedro@codesourcery.com> from "Pedro Alves" at Feb 22, 2011 06:34:42 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2011-03/txt/msg00965.txt.bz2 Pedro Alves wrote: > (struct frame_unwind) : New function pointer. It seems you initialized this field in all statically allocated frame_unwind structures, but not in those dynamically allocated and returned from the tramp_frame_prepend_unwinder routine. This causes crashes on all platforms that use the tramp-frame.c framework ... Fixed by the following patch. Tested on powerpc64-linux, committed to mainline. Bye, Ulrich ChangeLog: * tramp-frame.c (tramp_frame_prepend_unwinder): Set stop_reason field in returned unwinder. Index: gdb/tramp-frame.c =================================================================== RCS file: /cvs/src/src/gdb/tramp-frame.c,v retrieving revision 1.21 diff -u -p -r1.21 tramp-frame.c --- gdb/tramp-frame.c 1 Jan 2011 15:33:18 -0000 1.21 +++ gdb/tramp-frame.c 21 Mar 2011 17:14:17 -0000 @@ -163,6 +163,7 @@ tramp_frame_prepend_unwinder (struct gdb unwinder->type = tramp_frame->frame_type; unwinder->unwind_data = data; unwinder->sniffer = tramp_frame_sniffer; + unwinder->stop_reason = default_frame_unwind_stop_reason; unwinder->this_id = tramp_frame_this_id; unwinder->prev_register = tramp_frame_prev_register; frame_unwind_prepend_unwinder (gdbarch, unwinder); -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com