From patchwork Wed Nov 14 13:36:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 198913 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 770E52C007D for ; Thu, 15 Nov 2012 00:36:26 +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=1353504987; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=aXR5Agqs1H3KZ5IIJKOijSNC9Y4=; b=nPXtDSl/x4wfttHY8VQQT9PdOZCdKQmz0EuLMvRxjERJgCPPbpuTVp8T1Ot9I0 I+Nf3JhLmxhRxa6qOeCKH7Vq9bY3weWS5oDyO1R0V12G7lE5ln8w94rBq6Gpsw81 DXcuorxpoc/IVWdCx7G6QIHgZFd0UEiSAUx0l02isfUow= 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:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=cOY3krDTbNCcQGd77cpwrdF9WpvdRnn0YlO5pnQeQK86SuEG6rfmUtA4Q7bqwy UN7VwOa91+XtrzDZxD9L8AiEMvuOqCN84Bvgrkm9Gnnt6Wb0A5IhcCYdld1llMMI zS94M0XWRekrDWCJHLjCEzxFlIX2oCM81MnlJizbKNWYE=; Received: (qmail 24934 invoked by alias); 14 Nov 2012 13:36:19 -0000 Received: (qmail 24838 invoked by uid 22791); 14 Nov 2012 13:36:18 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_LV X-Spam-Check-By: sourceware.org Received: from mail-pa0-f47.google.com (HELO mail-pa0-f47.google.com) (209.85.220.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Nov 2012 13:36:09 +0000 Received: by mail-pa0-f47.google.com with SMTP id fa11so272870pad.20 for ; Wed, 14 Nov 2012 05:36:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.189.233 with SMTP id gl9mr77233218pbc.166.1352900168931; Wed, 14 Nov 2012 05:36:08 -0800 (PST) Received: by 10.68.19.138 with HTTP; Wed, 14 Nov 2012 05:36:08 -0800 (PST) In-Reply-To: <20121114132548.GE1886@tucnak.redhat.com> References: <20121114122609.GA9465@gmail.com> <20121114132548.GE1886@tucnak.redhat.com> Date: Wed, 14 Nov 2012 05:36:08 -0800 Message-ID: Subject: Re: [PATCH] Copy libsanitizer from llvm at revision 167890 From: "H.J. Lu" To: Jakub Jelinek Cc: Wei Mi , gcc-patches@gcc.gnu.org X-IsSubscribed: yes 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 On Wed, Nov 14, 2012 at 5:25 AM, Jakub Jelinek wrote: > On Wed, Nov 14, 2012 at 04:26:09AM -0800, H.J. Lu wrote: >> 2012-11-14 H.J. Lu >> >> * Copied from llvm at revision 167890. >> >> diff --git a/libsanitizer/asan/asan_allocator.cc b/libsanitizer/asan/asan_allocator.cc >> index 3a92802..de37137 100644 >> --- a/libsanitizer/asan/asan_allocator.cc >> +++ b/libsanitizer/asan/asan_allocator.cc >> @@ -1,5 +1,7 @@ >> //===-- asan_allocator.cc -------------------------------------------------===// >> // >> +// The LLVM Compiler Infrastructure >> +// > > I believe all these lines were striped off intentationally, Wei should know > better. So we shouldn't reintroduce them. > I withdrew my patch. I am applying this. Instead, --- a/libsanitizer/sanitizer_common/sanitizer_linux.cc +++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc @@ -34,7 +36,7 @@ namespace __sanitizer { // --------------- sanitizer_libc.h void *internal_mmap(void *addr, uptr length, int prot, int flags, int fd, u64 offset) { -#if __WORDSIZE == 64 +#if defined __x86_64__ return (void *)syscall(__NR_mmap, addr, length, prot, flags, fd, offset); #else return (void *)syscall(__NR_mmap2, addr, length, prot, flags, fd, offset); @@ -67,7 +69,7 @@ uptr internal_write(fd_t fd, const void *buf, uptr count) { } uptr internal_filesize(fd_t fd) { -#if __WORDSIZE == 64 +#if defined __x86_64__ struct stat st; if (syscall(__NR_fstat, fd, &st)) return -1;