From patchwork Tue Oct 13 11:22:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: max X-Patchwork-Id: 529690 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 407821402C4 for ; Tue, 13 Oct 2015 22:22:59 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=KLXMnZEL; 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=QO1VSu64xk99Ro3tW RGJMcjXBY5g78lmAyGzWEP0YD6ogdC/DVqBn9ImQAatBII86OAI2MFUcY+/6h4Zk 4qtEUu90S4F4yoepRwOVFWKR4+cIiiA6Y5WMj1mWJ+HfBV2NsInaNU7D4touSm63 KQcRFG0dMQV/34+BqT193iQxxk= 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=Vvp1Ihwb4eZ3tG8zOvrHjjm 2m8I=; b=KLXMnZELT3lZ3UCkUy8lu+aDleZdd0YJSexDZ3DzoCAJGoSvwvRTztc 21I6zV5L/4WeGDOAytS6AQMw3PAGb3YQqEn9PE5Rpd55WE/x0iu2L3kJzcOatpAe 33fjh0KsPUg5Qfi8ntEtexdxZZ6G70psMX6T0aNrSuaGGFxibF3g= Received: (qmail 40389 invoked by alias); 13 Oct 2015 11:22:52 -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 39727 invoked by uid 89); 13 Oct 2015 11:22:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 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:22:51 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NW5004UVOXZ9H60@mailout2.w1.samsung.com> for gcc-patches@gcc.gnu.org; Tue, 13 Oct 2015 12:22:47 +0100 (BST) Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 0C.24.05269.789EC165; Tue, 13 Oct 2015 12:22:47 +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 <0NW500IJ2OXYC180@eusync4.samsung.com>; Tue, 13 Oct 2015 12:22:47 +0100 (BST) Subject: [PATCH 7/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: <561CE97C.50002@partner.samsung.com> Date: Tue, 13 Oct 2015 14:22:36 +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=------------010506020509080703090702 X-IsSubscribed: yes This is the final patch. Force libsanitizer to use an old ABI for ubsan float cast data descriptors, because for some exprs (e.g. that type of tcc_declaration) we can't get the right location for now. I'm not sure about this, perhaps it should be fixed in GCC somehow. 2015-10-13 Maxim Ostapenko * ubsan/ubsan_handlers.cc (looksLikeFloatCastOverflowDataV1): Always return true for now. Index: libsanitizer/ubsan/ubsan_handlers.cc =================================================================== --- libsanitizer/ubsan/ubsan_handlers.cc (revision 250059) +++ libsanitizer/ubsan/ubsan_handlers.cc (working copy) @@ -307,6 +307,9 @@ } static bool looksLikeFloatCastOverflowDataV1(void *Data) { + // (TODO): propagate SourceLocation into DataDescriptor and use this + // heuristic than. + return true; // First field is either a pointer to filename or a pointer to a // TypeDescriptor. u8 *FilenameOrTypeDescriptor;