From patchwork Tue Nov 12 19:30:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 290754 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E85162C00A1 for ; Wed, 13 Nov 2013 06:30:50 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=D3WshKViEa22M/WJ1 XWaJT9h4xOPRtW9FDGiJhFvD64SR1tD/53rTlCs2vVjGQ5f0gzPtvSmA1h1bR0yk svJUunLmWrSjfeyVPD71IAFgsHcEQc+Mt5L+6FcCl3gP6i0kJCU7SXyz0Re3e1pI NJpFI0zdMaNVS68oSLq4KBSkYM= 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:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=gaF1zRvUzNlxp1CrGl8jqdU GDpU=; b=xtqkBv0kxN816fEM0oioy/JGc7k7QefH3phZiOJs2+hJ2clAvCeBjrw hHF+qvZEkOtMkGuX7BwF4luHaJsujezjhQU2ILybV2yGFEmXAup6RToPBcltQQP7 LTe7T2ggc8Fm7NAKVKWfrjAMes1rGALtcoIEEsFkL/q6Do2RP9GY= Received: (qmail 13785 invoked by alias); 12 Nov 2013 19:30:41 -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 13776 invoked by uid 89); 12 Nov 2013 19:30:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_50, RDNS_NONE, SPF_HELO_PASS, URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Nov 2013 19:30:39 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rACJUTTR008321 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 12 Nov 2013 14:30:29 -0500 Received: from tucnak.zalov.cz (vpn1-5-98.ams2.redhat.com [10.36.5.98]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rACJUIAs007723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Nov 2013 14:30:19 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.7/8.14.7) with ESMTP id rACJUGQ1006929; Tue, 12 Nov 2013 20:30:17 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.7/8.14.7/Submit) id rACJUF97006928; Tue, 12 Nov 2013 20:30:15 +0100 Date: Tue, 12 Nov 2013 20:30:15 +0100 From: Jakub Jelinek To: Kostya Serebryany Cc: Michael Meissner , Evgeniy Stepanov , Peter Bergner , Konstantin Serebryany , Jack Howarth , Alexander Potapenko , GCC Patches , Dodji Seketeli , Dmitry Vyukov , Bill Schmidt Subject: Re: Revert libsanitizer patches or fix 59009 Message-ID: <20131112193015.GZ27813@tucnak.zalov.cz> Reply-To: Jakub Jelinek References: <20131106115318.GZ27813@tucnak.zalov.cz> <20131112173725.GA24313@ibm-tiger.the-meissners.org> <20131112180403.GA30956@ibm-tiger.the-meissners.org> <20131112185704.GY27813@tucnak.zalov.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes On Tue, Nov 12, 2013 at 10:59:12AM -0800, Kostya Serebryany wrote: > This is all dead code in gcc repo. This is why I am asking for any > quick #ifdef. > in clang repo this code is used by MemorySanitizer (and will be used > by asan/tsan later). I can't find how it is used in msan/ in the llvm repo either, though admittedly just using grep (was grepping for pre_impl or post_impl), but sanitizer_common_syscalls.inc #undefs PRE_SYSCALL/POST_SYSCALL at the end, so I'm curious how do you use it. But not enough interest to actually build the llvm stuff. Anyway, the following #ifdefs out tons of dead code and still builds just fine, the only difference is that those symbols nothing really uses from libasan/libtsan are no longer exported, but nothing else changes. I guess the #if 0 can be replaced by some #ifdef with some nice name or something. BTW, the 10MB .bss in libubsan is really insane, while perhaps users are expecting to have huge overhead with libasan or libtsan, for libubsan it looks way too big. Why do you need it? Jakub --- libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc.jj 2013-11-12 11:31:00.000000000 +0100 +++ libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc 2013-11-12 20:04:49.981519143 +0100 @@ -14,6 +14,7 @@ // userspace headers. // Most "normal" includes go in sanitizer_platform_limits_posix.cc +#if 0 #include "sanitizer_platform.h" #if SANITIZER_LINUX @@ -43,3 +44,4 @@ namespace __sanitizer { } // namespace __sanitizer #endif // SANITIZER_LINUX +#endif --- libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc.jj 2013-11-12 11:31:00.000000000 +0100 +++ libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2013-11-12 20:04:35.967587643 +0100 @@ -10,7 +10,7 @@ // Sizes and layouts of platform-specific POSIX data structures. //===----------------------------------------------------------------------===// - +#if 0 #include "sanitizer_platform.h" #if SANITIZER_LINUX || SANITIZER_MAC @@ -881,3 +881,4 @@ CHECK_SIZE_AND_OFFSET(wordexp_t, we_offs #endif #endif // SANITIZER_LINUX || SANITIZER_MAC +#endif --- libsanitizer/sanitizer_common/sanitizer_common_syscalls.inc.jj 2013-11-12 11:31:00.000000000 +0100 +++ libsanitizer/sanitizer_common/sanitizer_common_syscalls.inc 2013-11-12 20:04:11.295715500 +0100 @@ -58,6 +58,8 @@ # define COMMON_SYSCALL_POST_FORK(res) #endif +#if 0 + // FIXME: do some kind of PRE_READ for all syscall arguments (int(s) and such). extern "C" { @@ -2722,6 +2724,8 @@ POST_SYSCALL(vfork)(long res) { } } // extern "C" +#endif + #undef PRE_SYSCALL #undef PRE_READ #undef PRE_WRITE