[llvm-commits] [PATCH] ASan/Android: fall back to the system allocator for unexpected deallocations

Evgeniy Stepanov eugeni.stepanov at gmail.com
Thu Dec 8 11:51:03 PST 2011


AFAIK, MacOSX does something like this already. We could speed up
__asan_mz_size significantly and make it lock-free.

I don't see a way to call __asan_init much earlier, other than
patching the linker or something like that.

On Thu, Dec 8, 2011 at 11:02 PM, Kostya Serebryany <kcc at google.com> wrote:
> Having such patch, even under ifdef ANDROID, will be very sad.
> It makes free() much slower (linear time + lock, instead of constant time
> w/o lock).
> We need to figure out some other way (e.g. try to run __asan_init() even
> earlier).
>
> --kcc
>
>
> On Thu, Dec 8, 2011 at 6:38 AM, Evgeniy Stepanov <eugeni.stepanov at gmail.com>
> wrote:
>>
>> On Android, allocations from static constructors of uninstrumented
>> libraries occur before we have a chance to replace the allocator. This
>> patch helps avoid crashing on the matching deallocations.
>
>



More information about the llvm-commits mailing list