Skip to content

access violation in __asan::QuickCheckForUnpoisonedRegion and other functions #2

@cerrv

Description

@cerrv

I have built my dll in release(with pdb) with asan and copied it to windows server 2016 1607. Also copied
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.34.31933\bin\Hostx86\x64\clang_rt.asan_dynamic-x86_64.dll to the app folder and launched the app. But get the below exceptions when attached to windbg. Continuing execution throws access violation in another callstack. It continues to throw the exception until app exit. Does not show any asan ERROR report.

(1cbc.1a50): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
clang_rt_asan_dynamic_x86_64!__asan::QuickCheckForUnpoisonedRegion+0x1f:
00007ffe`62b6145f 460fb61408      movzx   r10d,byte ptr [rax+r9] ds:000011ed`1639f000=??

(1cbc.1a50): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
clang_rt_asan_dynamic_x86_64!_asan_region_is_poisoned+0x90:
00007ffe`62b76d60 420fb60401      movzx   eax,byte ptr [rcx+r8] ds:0000043a`f488c000=??

(1cbc.1a50): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
clang_rt_asan_dynamic_x86_64!__asan::QuickCheckForUnpoisonedRegion+0x8e:
00007ffe`62b614ce 460fb61408      movzx   r10d,byte ptr [rax+r9] ds:0000043a`f4946078=??

clang_rt_asan_dynamic_x86_64!__asan::QuickCheckForUnpoisonedRegion:
00007ffe`62b61440 4c8bc1          mov     r8,rcx
00007ffe`62b61443 4885d2          test    rdx,rdx
00007ffe`62b61446 7503            jne     clang_rt_asan_dynamic_x86_64!__asan::QuickCheckForUnpoisonedRegion+0xb (00007ffe`62b6144b)
00007ffe`62b61448 b001            mov     al,1
00007ffe`62b6144a c3              ret
00007ffe`62b6144b 4883fa20        cmp     rdx,20h
00007ffe`62b6144f 7769            ja      clang_rt_asan_dynamic_x86_64!__asan::QuickCheckForUnpoisonedRegion+0x7a (00007ffe`62b614ba)
00007ffe`62b61451 4c8b0d281bb200  mov     r9,qword ptr [clang_rt_asan_dynamic_x86_64!_asan_shadow_memory_dynamic_address (00007ffe`63682f80)]
00007ffe`62b61458 498bc0          mov     rax,r8
00007ffe`62b6145b 48c1e803        shr     rax,3
00007ffe`62b6145f 460fb61408      movzx   r10d,byte ptr [rax+r9]

I built it on VS pro 2022 Version 17.4.4.
Is this a bug in asan or is there some other incompatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions