[cfe-dev] Introduce the -f[no-]address-sanitizer-dynamic-runtime option

Alexander Potapenko glider at google.com
Fri Aug 24 07:45:02 PDT 2012


On Fri, Aug 24, 2012 at 6:38 PM, Ted Kremenek <kremenek at apple.com> wrote:
> Hi Alex,
>
> I don't really see why we need a separate flag from -faddress-sanitizer.  On OS X, our only real long-term solution is to use the dynamic runtime.  While it's a great hack, the mach_override solution is just not a viable solution for the OS X security model.  At least with the dylib solution, we're far more likely to get it to work with OS X sandboxing.
You are right, but we'd like to keep mach_override until it's possible
to run something heavy (e.g. Chromium) under both versions and make
sure everything is fine.
In fact adding a separate flag for the dynamic runtime isn't really
needed for this -- we can live with -lclang_rt.asan_osx_dynamic
instead.

> I'm fine with having a separate flag for the purpose of staging implementations, but I don't see value in having users having to know about -faddress-sanitizer and -faddress-sanitizer-dynamic-runtime, and I don't see a reason why users would want to disable using the .dylib solution on OS X.
>
> What do you think?
> Ted
>
> On Aug 24, 2012, at 12:49 AM, Alexander Potapenko <glider at google.com> wrote:
>
>> Hi,
>>
>> the attached patch (see also https://codereview.appspot.com/6483051)
>> adds the -faddress-sanitizer-dynamic-runtime command line option to
>> Clang.
>> If set, this option causes the linker to use the runtime library built
>> as .dylib on Mac OS
>>
>> --
>> Alexander Potapenko
>> Software Engineer
>> Google Moscow
>> <asan-dynamic.patch>
>



-- 
Alexander Potapenko
Software Engineer
Google Moscow




More information about the cfe-dev mailing list