This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][Revised] Fix PR55521 by switching libsanitizer from mach_overrideto mac interpose functions on darwin
- From: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, wmi at google dot com, dodji at redhat dot com, mikestump at comcast dot net, iain at codesourcery dot com, glider at google dot com
- Date: Mon, 3 Dec 2012 11:21:10 +0400
- Subject: Re: [PATCH][Revised] Fix PR55521 by switching libsanitizer from mach_overrideto mac interpose functions on darwin
- References: <20121202200939.GA26229@bromo.med.uc.edu>
Hi Jack,
May I ask you to attach the complete patch (with ChangeLog entries and
regenerated files, if possible)?
May I also ask you to update libsanitizer/merge.sh to handle
libsanitizer/asan/dynamic ?
Assuming the files from upstream are copied verbatim (are they?), the
patch is ok.
Still, please give Alex (glider@google.com) a chance to review it as well.
Thanks,
--kcc
On Mon, Dec 3, 2012 at 12:09 AM, Jack Howarth <howarth@bromo.med.uc.edu> wrote:
> The attached patch eliminates PR 55521/sanitizer by switching libasan on darwin
> from using mach_override to mac function interposition via the importation of the
> asan/dynamic/asan_interceptors_dynamic.cc file from llvm.org's compiler-rt svn.
> The changes involve defining USING_MAC_INTERPOSE in configure.ac rather than
> rather than USING_MACH_OVERRIDE, introduction of the use of USING_MAC_INTERPOSE
> in Makefile.am to avoid building the interception subdirectory, the passage of
> -DMAC_INTERPOSE_FUNCTIONS in asan/Makefile.am when USING_MAC_INTERPOSE as well as
> the introduction of a -DMISSING_BLOCKS_SUPPORT flag to disable code that requires
> blocks support which FSF gcc lacks. The depreciated usage of USING_MACH_OVERRIDE
> is also removed from interception/Makefile.am. Bootstrapped on x86_64-apple-darwin10,
> x86_64-apple-darwin11 and x86_64-apple-darwin12. Passes...
>
> make -k check RUNTESTFLAGS="asan.exp --target_board=unix'{-m32,-m64}'"
>
> and fixes the previously failing cond1.C test case from PR55521 on all three targets.
> This revision adjusts the placement of the MAC_INTERPOSE_FUNCTIONS wrappers in
> libsanitizer/asan/dynamic/asan_interceptors_dynamic.cc to allow interpose to
> operate on those dispatch calls which don't require blocks support.
> Okay for gcc trunk?
> Jack
> ps The switch from mach_override to mac function interposition reduces the failures
> in the g++ testsuite from 841 to 323. While this is higher than the 107 seen with
> x86_64 Fedora 15, the number of failures emitting ASAN:SIGSEGV messages is lower
> on darwin at 8 compared to linux at 10.
>