From patchwork Tue Oct 13 11:21:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: max X-Patchwork-Id: 529688 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 28F6A1402C4 for ; Tue, 13 Oct 2015 22:21:46 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=tjdxtEdd; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=thp83bHxH/YXzq36m sJ1aCg5DiB8WhJv6S5ayXcEUbvXKZECEb0FHYlsXn0RSlRfJ9g/oNb+/NXJO3D0x bldUjiP35hMmvsFWFKNXTnzRRL9KXdXDbdgpWflNh/CcnQPkQhzcHdDOvoIGckev ew3XsqexWY5xD0x+cIzi5LScyA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=5fpkfwZ9dC+5fA7ySZzGUfO ocu8=; b=tjdxtEddvwaF5j4TPdDshcP7jHo2LT1UPRVXoBRiemWnC6cMMSI0686 xoLPrcCksQwAQHAxSMjAjFq9vT7gTFhRqmIcvPABfxvJ65Xwyn360IzXYjMrKalo QkvHYiieWxDrl/MV89WirJ1tAtwa1/szFIxqaOJAE6sz/U6HAu7o= Received: (qmail 22689 invoked by alias); 13 Oct 2015 11:21:39 -0000 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 Received: (qmail 22670 invoked by uid 89); 13 Oct 2015 11:21:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mailout2.w1.samsung.com Received: from mailout2.w1.samsung.com (HELO mailout2.w1.samsung.com) (210.118.77.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 13 Oct 2015 11:21:36 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NW5005SWOVX1E60@mailout2.w1.samsung.com> for gcc-patches@gcc.gnu.org; Tue, 13 Oct 2015 12:21:33 +0100 (BST) Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 1B.17.04846.C39EC165; Tue, 13 Oct 2015 12:21:32 +0100 (BST) Received: from [106.109.128.167] by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NW5008Q2OVW9150@eusync4.samsung.com>; Tue, 13 Oct 2015 12:21:32 +0100 (BST) Subject: [PATCH 6/7] Libsanitizer merge from upstream r249633. To: GCC Patches , Jakub Jelinek , Kostya Serebryany References: <561CE769.6050800@partner.samsung.com> Cc: Dmitry Vyukov , Marek Polacek , Yury Gribov , Slava Garbuzov , Vyacheslav Barinov From: Maxim Ostapenko Message-id: <561CE931.3010909@partner.samsung.com> Date: Tue, 13 Oct 2015 14:21:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-version: 1.0 In-reply-to: <561CE769.6050800@partner.samsung.com> Content-type: multipart/mixed; boundary=------------020101080900060405020007 X-IsSubscribed: yes This patch adjusts the fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61771 to extract the last PC from the stack frame if no valid FP is available for ARM. 2015-10-13 Maxim Ostapenko * sanitizer_common/sanitizer_stacktrace.cc (GetCanonicFrame): Assume we compiled code with GCC when extracting the caller PC for ARM if no valid frame pointer is available. Index: libsanitizer/sanitizer_common/sanitizer_stacktrace.cc =================================================================== --- libsanitizer/sanitizer_common/sanitizer_stacktrace.cc (revision 250059) +++ libsanitizer/sanitizer_common/sanitizer_stacktrace.cc (working copy) @@ -62,8 +62,8 @@ // Nope, this does not look right either. This means the frame after next does // not have a valid frame pointer, but we can still extract the caller PC. // Unfortunately, there is no way to decide between GCC and LLVM frame - // layouts. Assume LLVM. - return bp_prev; + // layouts. Assume GCC. + return bp_prev - 1; #else return (uhwptr*)bp; #endif