[cfe-commits] [llvm-commits] [PATCH] [asan] Use zero-based shadow by default on Android

Evgeniy Stepanov eugeni.stepanov at gmail.com
Fri May 25 03:16:13 PDT 2012


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


> 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
>>
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asan-android-pie.patch
Type: application/octet-stream
Size: 1273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120525/bf9275e2/attachment.obj>


More information about the cfe-commits mailing list