From patchwork Fri Mar 16 13:29:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "EXTERNAL Waechtler Peter (Fa. TCP, CM-AI/PJ-CF31)" X-Patchwork-Id: 147204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 9BC7DB6F98 for ; Sat, 17 Mar 2012 00:29:45 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1332509387; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:CC:Date:Subject:Message-ID:Content-Type: Content-Transfer-Encoding:MIME-Version:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=PwyMZrIN7XD1TkSaMALCyAmQY/0=; b=Mt0k0CAKJZ5UY+K RlTNRO3NMuTtyWsJXVDXDVzloHJq/jtF7AERg12xMnZWHhnjJBKMbQBj3ojDlXz1 dk38n4yBTunTw47lYxOBxPKlQyIg+C9OwFrxZttSiGH3IzcfTxRkWfsVnf3UQxRk LHScdq2sqN+muXs+wAWS6C+ZULD0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:CC:Date:Subject:Message-ID:Content-Type:Content-Transfer-Encoding:MIME-Version:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=D84ajHmXCZQv8n27Z/ebeUG7QuXjyCxLHhjJFtCPhuVitk+Aqx64C9x3UbImPU L2hqL+Mt/vVcLuKJH9gOcA3BIhUejwT6j0A3TsV0oFEGGCgfRPt46qlkQ3hkWmtM W2TEVD6nrdAcorlsE/BVhFpmL5dkE138X/SCL9328KgjY=; Received: (qmail 28817 invoked by alias); 16 Mar 2012 13:29:41 -0000 Received: (qmail 28796 invoked by uid 22791); 16 Mar 2012 13:29:40 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI X-Spam-Check-By: sourceware.org Received: from smtp2-v.fe.bosch.de (HELO smtp2-v.fe.bosch.de) (139.15.237.6) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Mar 2012 13:29:25 +0000 Received: from vsmta14.fe.internet.bosch.com (unknown [10.4.98.30]) by imta24.fe.bosch.de (Postfix) with ESMTP id AAC3DB0020A; Fri, 16 Mar 2012 14:29:24 +0100 (CET) Received: from localhost (vsgw1.fe.internet.bosch.com [10.4.98.15]) by vsmta14.fe.internet.bosch.com (Postfix) with SMTP id 3A5891B40B6B; Fri, 16 Mar 2012 14:29:24 +0100 (CET) Received: from SI-MBX06.de.bosch.com ([10.3.153.49]) by fe-hub03.de.bosch.com ([10.3.153.62]) with mapi; Fri, 16 Mar 2012 14:29:19 +0100 From: "EXTERNAL Waechtler Peter (Fa. TCP, CM-AI/PJ-CF31)" To: "gcc-patches@gcc.gnu.org" CC: "libstdc++@gcc.gnu.org" , "paul@codesourcery.com" , "pwaechtler@mac.com" Date: Fri, 16 Mar 2012 14:29:17 +0100 Subject: [PATCH] eh_personality.cc: unwinding on ARM Message-ID: <274124B9C6907D4B8CE985903EAA19E91B2D361D48@SI-MBX06.de.bosch.com> MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Sorry this is a resend with corrected email addresses, I noticed a bug in the __ARM_EABI_UNWINDER__ case that shows up as a loop in backtrace(): ======= Backtrace: ========= /lib/libc.so.6[0x4c8c11cc] /lib/libc.so.6[0x4c8c62a8] /lib/libc.so.6(cfree+0x38)[0x4c8c63a8] ./bt(_Z6nqueenPiii+0xf0)[0xa8e0] ./bt(_Z6nqueenPiii+0xf0)[0xa8e0] ./bt(_Z6nqueenPiii+0xf0)[0xa8e0] ./bt(_Z6nqueenPiii+0xf0)[0xa8e0] [.. and so on] while a proper callstack (with demangled names and libunwind) looks like: ====== backtrace (libunwind): ./bt( libunwind_backtrace +0x30)[0xb4a4] ./bt( eh_stack_unwind +0xe0)[0xb3c0] ./bt[0xc704] /lib/libc.so.6( __default_rt_sa_restorer_v2 +0x0)[0x4c883770] /lib/libc.so.6( gsignal +0x40)[0x4c88241c] /lib/libc.so.6( abort +0x1c0)[0x4c88680c] /lib/libc.so.6[0x4c8b726c] /lib/libc.so.6[0x4c8c11cc] /lib/libc.so.6[0x4c8c62a8] /lib/libc.so.6( cfree +0x38)[0x4c8c63a8] ./bt( nqueen(int*, int, int) +0xf0)[0xa8e0] ./bt( main +0x230)[0xac6c] /lib/libc.so.6( __libc_start_main +0x120)[0x4c86d104] ./bt[0xa510] The CodeSourcery toolchain contains a "fix" like the following, please consider for adding it. Best regards Peter Wächtler --- eh_personality.cc.orig 2012-02-28 16:35:20.000000000 +0100 +++ eh_personality.cc 2012-02-28 18:12:03.000000000 +0100 @@ -387,6 +386,9 @@ switch (state & _US_ACTION_MASK) { case _US_VIRTUAL_UNWIND_FRAME: + if (state & _US_FORCE_UNWIND) + CONTINUE_UNWINDING; + actions = _UA_SEARCH_PHASE; break;