From patchwork Fri Nov 21 14:07:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 413065 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 75BFF140180 for ; Sat, 22 Nov 2014 01:08:10 +1100 (AEDT) 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:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=jCnga5vxvKl66R0uV5kdUEymCeyAsbcR9L0VU8HWRo5 USQn6Ro2MkbBmUkRGV5BpxXk0ifUhOvyuc+cxLNUoUtSuD0smQ695p3VoKcMWI6L F3Di0eZvVQLsyt62VXJfuSHxWvkiWeTI18UqPyi4R5BMbdZ98ezX+eYrZk0W6u6Q = 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:subject:message-id:reply-to:mime-version:content-type; s=default; bh=4VHB50vXDU+HgQe1v+LfquH/svA=; b=naFsBKihAdSAM9NCK RiHCV9boxxXJZ1+aB2HI3k72hY6jVoZGlCdi9FPVqEwJLwRyEiCP0P2HMNkmZAaH QWC+vHOcAIEEBlziyp9Wt8G4G676DhV30TmE6aEaGPbcUG+0Khe5xZfAPNJ5pAlO 1y/nW2kfZr0fe6qgJTwClHM2gM= Received: (qmail 32614 invoked by alias); 21 Nov 2014 14:08:03 -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 32597 invoked by uid 89); 21 Nov 2014 14:08:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 21 Nov 2014 14:08:02 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sALE80YW004319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 21 Nov 2014 09:08:00 -0500 Received: from tucnak.zalov.cz (ovpn-116-73.ams2.redhat.com [10.36.116.73]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sALE7wE3005710 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO) for ; Fri, 21 Nov 2014 09:07:59 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id sALE7uGF012312 for ; Fri, 21 Nov 2014 15:07:56 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id sALE7tZ5012311 for gcc-patches@gcc.gnu.org; Fri, 21 Nov 2014 15:07:55 +0100 Date: Fri, 21 Nov 2014 15:07:55 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Cherry-pick a libsanitizer bugfix (PR sanitizer/64013) Message-ID: <20141121140755.GG1745@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes Hi! I've committed this as obvious. 2014-11-21 Jakub Jelinek PR sanitizer/64013 * sanitizer_common/sanitizer_linux.cc (FileExists): Cherry pick upstream r222532. Jakub --- libsanitizer/sanitizer_common/sanitizer_linux.cc (revision 222531) +++ libsanitizer/sanitizer_common/sanitizer_linux.cc (revision 222532) @@ -283,17 +283,15 @@ uptr internal_execve(const char *filenam // ----------------- sanitizer_common.h bool FileExists(const char *filename) { -#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS struct stat st; +#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS if (internal_syscall(SYSCALL(newfstatat), AT_FDCWD, filename, &st, 0)) - return false; #else - struct stat st; if (internal_stat(filename, &st)) +#endif return false; // Sanity check: filename is a regular file. return S_ISREG(st.st_mode); -#endif } uptr GetTid() {