[compiler-rt] r220571 - tsan: support mmap(MAP_32BIT)
Dmitry Vyukov
dvyukov at google.com
Mon Jan 19 07:03:23 PST 2015
On Fri, Jan 16, 2015 at 6:05 PM, Alexey Samsonov <vonosmas at gmail.com> wrote:
>
> On Wed, Jan 14, 2015 at 6:05 PM, Dmitry Vyukov <dvyukov at google.com> wrote:
>>
>> Do you mean linux/C++ and 0x020000000000 - 0x100000000000 memory range?
>> If so, I don't see what is broken.
>> I've added the following debug output:
>>
>> + Printf("kShadowBeg=%p kHiAppMemBeg=%p shadow=%p ok=%d\n",
>> + kShadowBeg, kHiAppMemBeg, MemToShadow(kHiAppMemBeg),
>> IsShadowMem(MemToShadow(kHiAppMemBeg)));
>
>
> Have you tried to build and run runtime with TSAN_SHADOW_COUNT=2 ?
> uptr MemToShadow(uptr x) {
> 78 DCHECK(IsAppMem(x));
> 79 return (((x) & ~(kAppMemMsk | (kShadowCell - 1)))
> 80 ^ kAppMemXor) * kShadowCnt;
>
> const uptr kHiAppMemBeg = 0x7e8000000000ull;
> const uptr kAppMemMsk = 0x7c0000000000ull;
> const uptr kAppMemXor = 0x020000000000ull;
>
> x = 0x7e8000000000ull
> y = (x) & ~(kAppMemMsk | (kShadowCell - 1)) = 0x028000000000ull;
> z = y ^ kAppMemXor = 0x008000000000ull;
> z * kShadowCnt = z * 2 = 0x010000000000ull;
OK, now I see.
There is no simple way to fix it, removed in rev 226466.
More information about the llvm-commits
mailing list