On Thu, Feb 28, 2019 at 11:57 AM Konstantin Serebryany <
[email protected]> wrote:

> What is the fixed address range you are using?
>
> Exacts not known, looks like it's at least 34 bits starting from
0x200000000


> There are two fixed address ranges that asan is using: one for the shadow,
> one for the allocator.
>
> If you are using the latest clang, you may try -mllvm
> -asan-force-dynamic-shadow=1, which will make asan use dynamic shadow base.
> Note:
>   * you can not mix object files built with
> asan+asan-force-dynamic-shadow=1 and with asan+asan-force-dynamic-shadow=0
>   * this flag is expected to work, but does not have the same amount of
> testing as the default mode. So, if something breaks, we may not be able to
> help.
>
> I don't think we support dynamic allocator range on x86_64 linux.
>

Is it a matter of "simply" changing the 2 address regions, and maybe
shrinking the space size?  I don't need them to be dynamic so much as not
overlapping.

I'm not on clang latest, is 7 recent enough?


>
> It might still be simpler to modify your code to use a range that doesn't
> conflict with asan.
>

I guarantee you it's not.

-Jason


On Thu, Feb 28, 2019 at 11:57 AM Konstantin Serebryany <
[email protected]> wrote:

> What is the fixed address range you are using?
>
> There are two fixed address ranges that asan is using: one for the shadow,
> one for the allocator.
>
> If you are using the latest clang, you may try -mllvm
> -asan-force-dynamic-shadow=1, which will make asan use dynamic shadow base.
> Note:
>   * you can not mix object files built with
> asan+asan-force-dynamic-shadow=1 and with asan+asan-force-dynamic-shadow=0
>   * this flag is expected to work, but does not have the same amount of
> testing as the default mode. So, if something breaks, we may not be able to
> help.
>
> I don't think we support dynamic allocator range on x86_64 linux.
>
> It might still be simpler to modify your code to use a range that doesn't
> conflict with asan.
>
> --kcc
>
>
>
> On Thu, Feb 28, 2019 at 1:32 AM Jason Newton <[email protected]> wrote:
>
>> Hello,
>>
>> I'm a long time fan/user of asan.  I was trying to use it in an
>> application with a big chunk of virtual memory mapped to a fixed address
>> range, it's only a fraction of the virtual address space (a significant
>> one), but there's still plenty of bits to go around, and hopefully enough
>> for asan to do it's thing.
>>
>> So I was trying to figure out how make asan coexist with this.  asan
>> loads up first which then causes problems for the application after that.
>> Looking at asan_allocator.h, I can see this:
>>
>>
>> #else //From what I can tell a standard x86_64 intel machine on linux
>> should land here.
>>
>> const uptr kAllocatorSpace = 0x600000000000ULL;
>> const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
>> typedef DefaultSizeClassMap SizeClassMap;
>> # endif
>> template <typename AddressSpaceViewTy>
>> struct AP64 { // Allocator64 parameters. Deliberately using a short name.
>> static const uptr kSpaceBeg = kAllocatorSpace;
>>
>> static const uptr kSpaceSize = kAllocatorSize;
>>
>>
>> Not quite sure if these are the knobs I'm looking for -  or what the
>> exact meaning is of kSpaceBeg/kAllocatorSpace
>> Basically my thought is , could I restrict libasan so it only claims the
>> virtual address space above the problematic region.
>>
>> Thoughts or pointers?
>>
>> -Jason
>>
>> --
>> 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.
>>
> --
> 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.
>

-- 
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