From patchwork Mon Nov 7 08:24:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Ostapenko X-Patchwork-Id: 81001 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp895661qge; Mon, 7 Nov 2016 00:25:24 -0800 (PST) X-Received: by 10.98.72.81 with SMTP id v78mr11399218pfa.104.1478507124451; Mon, 07 Nov 2016 00:25:24 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id s17si30042152pgi.151.2016.11.07.00.25.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 00:25:24 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-440567-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-440567-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-440567-patch=linaro.org@gcc.gnu.org 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:cc:from:message-id:date:mime-version:in-reply-to :content-type:references; q=dns; s=default; b=T3K7H5QM7vAix+h7X7 xOAfSRQnQlKts1HOSsN7+/fgGd5u5cppmiCMjipkCWBc6cuoqpBZx1j1vFf9yhFu 56mRQIxk2kSQlmBr107LdF1UR7ZUVcDsSXhZTZypYxpfTQzxgv4VDH61fWuaBhlh 5mOgC5R3pp2wnvpb1kW6NCfUo= 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:cc:from:message-id:date:mime-version:in-reply-to :content-type:references; s=default; bh=/sMi4CVJiq2j2oirRTWLPv+y UzQ=; b=qTp/mmywjIKCj51mWxYAballkFbWXFePAXr1WEEAPYu6nijeGdFX3UUM DOo3cm0aYjVp77wtfGRx1qf1SBTwDJoSwFJiQKhGwJGbjJBaNBtF7PMmDqxDQyla cQfIys089ZgfDcprrHvBsftQXfh+54FKZhIAn4J8SRjTMpAwhvA= Received: (qmail 8697 invoked by alias); 7 Nov 2016 08:25:08 -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 8661 invoked by uid 89); 7 Nov 2016 08:25:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=layouts, adjusts, HContent-type:multipart, HContent-type:boundary X-HELO: mailout3.w1.samsung.com Received: from mailout3.w1.samsung.com (HELO mailout3.w1.samsung.com) (210.118.77.13) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Nov 2016 08:24:57 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OG9006S6JDHRZ40@mailout3.w1.samsung.com> for gcc-patches@gcc.gnu.org; Mon, 07 Nov 2016 08:24:53 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161107082452eucas1p12c89a25013f79015bde745a046b2804f~Etl4DvALO1555315553eucas1p1x; Mon, 7 Nov 2016 08:24:52 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges5.samsung.com (EUCPMTA) with SMTP id EC.5A.19540.45A30285; Mon, 7 Nov 2016 08:24:52 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20161107082451eucas1p2fe6f13bf569875cd62ccd673bc7db73a~Etl3XUJ5i3081430814eucas1p2Q; Mon, 7 Nov 2016 08:24:51 +0000 (GMT) Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 68.0E.07726.25A30285; Mon, 7 Nov 2016 08:24:50 +0000 (GMT) Received: from [106.109.129.18] by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OG900K6HJDE9070@eusync4.samsung.com>; Mon, 07 Nov 2016 08:24:51 +0000 (GMT) Subject: [PATCH 3/7] Libsanitizer merge from upstream r285547. To: GCC Patches Cc: Jakub Jelinek , Kostya Serebryany , Yuri Gribov From: Maxim Ostapenko Message-id: <58203A52.60604@samsung.com> Date: Mon, 07 Nov 2016 11:24:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-version: 1.0 In-reply-to: <582039C4.4040606@samsung.com> Content-type: multipart/mixed; boundary=------------030101090800060701020808 X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161107082451eucas1p2fe6f13bf569875cd62ccd673bc7db73a X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?TWFrc2ltIE9zdGFwZW5rbxtTUlItU1cgVG9vbHMgTGFiGw==?= =?UTF-8?B?7IK87ISx7KCE7J6QG0VuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?TWF4aW0gT3N0YXBlbmtvG1NSUi1TVyBUb29scyBMYWIbU2Ft?= =?UTF-8?B?c3VuZ8KgRWxlY3Ryb25pY3MbRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG0NJU0hRG0MxMEdEMDFHRDAxMDE1Nw==?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161107082451eucas1p2fe6f13bf569875cd62ccd673bc7db73a X-RootMTR: 20161107082451eucas1p2fe6f13bf569875cd62ccd673bc7db73a References: <582039C4.4040606@samsung.com> 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. >From 6dc6e4f761080cf19a161fb0e27c1fd584688f40 Mon Sep 17 00:00:00 2001 From: Maxim Ostapenko Date: Tue, 25 Oct 2016 20:27:37 +0300 Subject: [PATCH 3/7] libsanitizer/ * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229115 138bc75d-0d04-0410-961f-82ee72b054a4 --- libsanitizer/ChangeLog | 6 ++++++ libsanitizer/sanitizer_common/sanitizer_stacktrace.cc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index 10b1207..7e4f89f 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,5 +1,11 @@ 2016-11-07 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. + +2016-11-07 Maxim Ostapenko + PR sanitizer/63958 Reapply: 2014-10-14 David S. Miller diff --git a/libsanitizer/sanitizer_common/sanitizer_stacktrace.cc b/libsanitizer/sanitizer_common/sanitizer_stacktrace.cc index 531f256..cbb3af2 100644 --- a/libsanitizer/sanitizer_common/sanitizer_stacktrace.cc +++ b/libsanitizer/sanitizer_common/sanitizer_stacktrace.cc @@ -55,8 +55,8 @@ static inline uhwptr *GetCanonicFrame(uptr bp, // 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 -- 1.9.1