[cfe-commits] [llvm-commits] [PATCH] [asan] Use zero-based shadow by default on Android
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Mon Jun 4 02:44:13 PDT 2012
On Fri, May 25, 2012 at 3:08 PM, Chandler Carruth <chandlerc at google.com> wrote:
> On Fri, May 25, 2012 at 3:16 AM, Evgeniy Stepanov
> <eugeni.stepanov at gmail.com> wrote:
>>
>> On Wed, May 23, 2012 at 4:07 PM, Evgeniy Stepanov
>> <eugeni.stepanov at gmail.com> wrote:
>> > Good point. Both patches landed, here is another one that adds a
>> > driver check for -pie.
>>
>> ping w/ a patch
>
>
> LGTM
>
> The diagnostic says that '-pie' is required with ASan on Android, but
> nothing about during compiling vs. during linking? Do we blanket require
> this flag, or does it only apply to some steps? Might be nice to make the
> diagnostic explicit here.
-pie only seems to affect linking. We don't really care about
compilation step, as long as linking produces a position-independent
executable.
>
>>
>>
>>
>> > On Wed, May 23, 2012 at 3:04 PM, Chandler Carruth <chandlerc at google.com>
>> > wrote:
>> >> On Wed, May 23, 2012 at 3:58 AM, Evgeniy Stepanov
>> >> <eugeni.stepanov at gmail.com> wrote:
>> >>>
>> >>> Note that this change will require building binaries with -fPIE -pie.
>> >>> I believe there is really no way around this. We can not change shadow
>> >>> location on a per-binary basic because of the shared runtime, and
>> >>> there is no universal location that fit both PIE and non-PIE.
>> >>>
>> >>> I'm going to land this soon, then add some runtime checks to ensure
>> >>> that the shadow does not silently override any preexisting mappings.
>> >>
>> >>
>> >> I haven't looked at the patches, but it would be good to also teach the
>> >> Clang driver to produce an error if the appropriate options are not
>> >> attached
>> >> to the compile and link commands but '-faddress-sanitizer' is.
>> >>
>> >>>
>> >>>
>> >>> On Tue, May 22, 2012 at 6:43 PM, Kostya Serebryany <kcc at google.com>
>> >>> wrote:
>> >>> > Both look good, thanks!
>> >>> > --kcc
>> >>> >
>> >>> > On Tue, May 22, 2012 at 6:38 PM, Evgeniy Stepanov
>> >>> > <eugeni.stepanov at gmail.com> wrote:
>> >>> >>
>> >>> >> Hi,
>> >>> >>
>> >>> >> these patches (one to llvm, another to compiler-rt) change ASan
>> >>> >> default shadow offset on Android to zero. This seems to marginally
>> >>> >> improve performance of Thumb code, significantly (~5%) saves code
>> >>> >> size, and avoids address space collisions with the main executable
>> >>> >> in
>> >>> >> a non-ASLR case.
>> >>> >>
>> >>> >> Please review.
>> >>> >>
>> >>> >> _______________________________________________
>> >>> >> llvm-commits mailing list
>> >>> >> llvm-commits at cs.uiuc.edu
>> >>> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> >>> >>
>> >>> >
>> >>> _______________________________________________
>> >>> llvm-commits mailing list
>> >>> llvm-commits at cs.uiuc.edu
>> >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> >>
>> >>
>
>
More information about the cfe-commits
mailing list