From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30135 invoked by alias); 4 Dec 2012 16:06:23 -0000 Received: (qmail 30120 invoked by uid 22791); 4 Dec 2012 16:06:18 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,TW_SV X-Spam-Check-By: sourceware.org Received: from mail-gh0-f175.google.com (HELO mail-gh0-f175.google.com) (209.85.160.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 04 Dec 2012 16:06:04 +0000 Received: by mail-gh0-f175.google.com with SMTP id z2so619856ghb.20 for ; Tue, 04 Dec 2012 08:06:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=rKPkHrI9oY2ecUX4xSTsFhfa7scXkJRzrFnfMJ1FVKY=; b=Y1miwKirrB6e/Id5MemM7fffC9czGGQ0JbQzhv6QDxTQMYJiGyiyW6EcAYdZMd0tgf JFqu/nG92iNWwdp0ysHn/0su2ww0QBl31a4/rCGcz1WpzbFi8NBXczjaGPQtMIAzm+yt 7SZXWNNWszCg88+h+0vXa+BIapsru5FY4+BqxaxkdP3hmlhEOFlXw7cmYcOUnq8rjXK8 7cBEOowgWCJA66E4yDUWOAR3dnnMQjmoTJsl1B4ejKu0juzUICCeJHyDlIkaTIYHAHJ2 qCSt4+WiUjk2nUs/w4VrjATAFNQdtYodxOEqH84DCZsAbz64IkENNwWTyXp7C97h+xjG 429w== MIME-Version: 1.0 Received: by 10.58.232.226 with SMTP id tr2mr12229360vec.48.1354637163370; Tue, 04 Dec 2012 08:06:03 -0800 (PST) Received: by 10.52.97.8 with HTTP; Tue, 4 Dec 2012 08:06:03 -0800 (PST) In-Reply-To: <20121204152440.GA9645@bromo.med.uc.edu> References: <20121203160240.GA32714@bromo.med.uc.edu> <078BAB39-A30D-42C4-AB39-95789C32A622@comcast.net> <20121204150307.GA9473@bromo.med.uc.edu> <20121204152440.GA9645@bromo.med.uc.edu> Date: Tue, 04 Dec 2012 16:06:00 -0000 Message-ID: Subject: Re: [PATCh][Revisedx2] Fix PR55521 by switching libsanitizer from mach_overrideto mac interpose functions on darwin From: Alexander Potapenko To: Jack Howarth Cc: Konstantin Serebryany , Mike Stump , "gcc-patches@gcc.gnu.org" , Wei Mi , Dodji Seketeli , iain@codesourcery.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnsgIvrdjYw9VZbHoEqjCZP/7s1JnogHNrMo5+Kwpz10XTF87r9DACvrX8EmOIB57JgtnuFNGJo+29k7L1n3SqjTI/GGTA4Dazb0bjKdHcJaCsKUulekc8qBdLAkTAZNR7QZxz5BnhCU9V1SGFxtCIwVBMHjeg58JS2pQWgN1vg0plZCBA3Z4INoiJkwZnUvVa+sh5P X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00240.txt.bz2 Clang hasn't fully switched to dylib interposition yet. The -fsanitize=3Daddress still links the static version of the runtime. On Tue, Dec 4, 2012 at 7:24 PM, Jack Howarth wro= te: > On Tue, Dec 04, 2012 at 07:10:27PM +0400, Konstantin Serebryany wrote: >> On Tue, Dec 4, 2012 at 7:03 PM, Jack Howarth = wrote: >> > On Tue, Dec 04, 2012 at 11:02:01AM +0400, Konstantin Serebryany wrote: >> >> r194120. >> >> I've tested it on Linux, but not on Mac. >> > >> > kcc, >> > Tested at r194135 on x86_64-apple-darwin12. Thanks for the commit. >> > Jack >> > ps Since clang in svn trunk has already switched to the mac function i= mposition version of asan, >> >> did it? > > Thats what Nick Kledzik said... > > "The clang version of asan has already moved to using interposing and DYL= D_INSERT_LIBRARIES." > > I'll reconfirm that with llvm/clang trunk svn tonight (as the bootstrap o= n darwin there is > currently broken). > Jack > >> >> > it might be time to deprecate mach_override out of llvm's compiler-rt = trunk so >> > lib/interception/mach_override/, lib/interception/interception_mac.cc = and >> > lib/interception/interception_mac.h could be removed. >> >> >> >> On Tue, Dec 4, 2012 at 6:44 AM, Alexander Potapenko wrote: >> >> > I've added MISSING_BLOCKS_SUPPORT to LLVM compiler-rt in r169206. >> >> > The rest of your change looks good to me as well. >> >> > >> >> > On Mon, Dec 3, 2012 at 6:33 PM, Alexander Potapenko wrote: >> >> >> Jack, >> >> >> >> >> >> Note that MAC_INTERPOSE_FUNCTIONS is always defined in interceptio= n.h >> >> >> to either 0 or 1. >> >> >> I'm going to keep "#if MAC_INTERPOSE_FUNCTIONS" (adding "&& >> >> >> !defined(MISSING_BLOCKS_SUPPORT) >> >> >> " where appropriate) in libsanitizer. >> >> >> >> >> >> On Mon, Dec 3, 2012 at 11:17 AM, Mike Stump wrote: >> >> >>> On Dec 3, 2012, at 8:02 AM, Jack Howarth wrote: >> >> >>>> The attached patch eliminates PR 55521/sanitizer by switching = libasan on darwin >> >> >>>> from using mach_override to mac function interposition >> >> >>> >> >> >>> So, I'm thinking the sanitizer people will just review and approv= e it, even though it says darwin and is heavily darwin specific=E2=80=A6 I= t's ok by me. >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> >> Alexander Potapenko >> >> >> Software Engineer >> >> >> Google Moscow >> >> > >> >> > >> >> > >> >> > -- >> >> > Alexander Potapenko >> >> > Software Engineer >> >> > Google Moscow --=20 Alexander Potapenko Software Engineer Google Moscow