On Wed, Mar 25, 2015 at 10:23 AM, Venkataramanan Kumar
<[email protected]> wrote:
> Hi Konstantin/Renato,
>
>>> The values that define the location of the shadow are initialized at 
>>> startup,
>>> so it should not be a problem.
>>
>> Excellent!
>>
>
> The Shadow offset, I need to set "1<<39" for Aarch64 (42 bit VA) and
> 1<<36 for Aarch64 (39 bit VA).
>
> In asan_mapping.h,  it is defined as static const u64
> kAArch64_ShadowOffset64 = 1ULL << 36.


Why 1ULL << 36 or some other smaller value will not work for both?

>
> If I understand correctly, I need to initialize this at startup in
> both places,  compiler-rt/lib/asan and LLVM 's instrumentation place
> lib/Transforms/Instrumentation/AddressSanitizer.cpp ?
>
>>> The values for Allocator64 have to be compile-time constants for
>>> better performance,
>>> but  Allocator64 is not going to work on 39 (and probably on 42) bits 
>>> anyway.
>>> We'll need to use Allocator32.
>
> For Aarch64 with 42 VA bit I need to turn on Allocator64
Why?

> and for 39
> bit VA I need to turn on Allocator32.
> ASAN/TSAN does not work when allocator32 is on for 42bit VA.

Let's not mix asan and tsan.
What's wrong with asan when "allocator32 is on for 42bit VA"?
>
> So I also need to detect and switch allocator types based on VA.
>
>
> On 25 March 2015 at 22:21, Renato Golin <[email protected]> wrote:
>> On 25 March 2015 at 16:41, Konstantin Serebryany
>> <[email protected]> wrote:
>>> Is it only 39 and 42, or is there a 3-rd option?
>>
>> As far as I know, only these two.
>>
>>
>>> The values that define the location of the shadow are initialized at 
>>> startup,
>>> so it should not be a problem.
>>
>> Excellent!
>>
>>
>>> The values for Allocator64 have to be compile-time constants for
>>> better performance,
>>> but  Allocator64 is not going to work on 39 (and probably on 42) bits 
>>> anyway.
>>> We'll need to use Allocator32.
>>
>> That's our conclusion, too.
>>
>> I think the next step is to implement the run-time check for AArch64.
>>
>> Thanks for the help!
>>
>> cheers,
>> --renato

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to