ASAN – Suppressing Reports in External Libraries (LLVM 13, Windows)

  address-sanitizer, clang, dll, llvm, windows

I am trying to suppress ASAN issues in an external library, therefore I am following llvm-asan-suppressing-reports-in-external-libraries, the docs says:

If you run into an issue in external libraries, we recommend immediately reporting it to the library maintainer so that it gets addressed

ASAN trace

==6968==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x01e7aceb3be0 in thread T0
    #0 0x7ffec9a97f31  (D:amin_reprex_python_c_extension_asanmin_reprex_python_c_extension_asanllvmlibclang.0.0libwindowsclang_rt.asan_dynamic-x86_64.dll+0x180037f31)
    #1 0x7ffeca696030  (C:hostedtoolcachewindowsPython.10.0x64python310.dll+0x180026030)
    #2 0x7ffeca67aaaf  (C:hostedtoolcachewindowsPython.10.0x64python310.dll+0x18000aaaf)

...

    #114 0x7ff72208122f  (C:hostedtoolcachewindowsPython.10.0x64python.exe+0x14000122f)
    #115 0x7ffefee17973  (C:WindowsSystem32KERNEL32.DLL+0x180017973)
    #116 0x7fff0071a2f0  (C:WindowsSYSTEM32ntdll.dll+0x18005a2f0)

Address 0x01e7aceb3be0 is a wild pointer inside of access range of size 0x000000000001.
SUMMARY: AddressSanitizer: bad-free (D:amin_reprex_python_c_extension_asanmin_reprex_python_c_extension_asanllvmlibclang.0.0libwindowsclang_rt.asan_dynamic-x86_64.dll+0x180037f31) 
==6968==ABORTING

Here a link to the full ASAN trace.

What I did so far

I created a my_asan.supp and loaded it with ASAN_OPTIONS=suppressions=my_asan.suppas suggested in the docs with the following contents:

interceptor_via_fun:_PyObject_Realloc
interceptor_via_fun:realloc
interceptor_via_lib:C:/Python39/python3.dll
interceptor_via_lib:C:/s/eklang/DevOps/clang/bin/LLVM-13.0.0-win64/lib/clang/13.0.0/lib/windows/clang_rt.asan_dynamic-x86_64.dll
interceptor_via_lib:C:/Windows/System32/KERNEL32.DLL
interceptor_via_lib:C:/Windows/SYSTEM32/ntdll.dll
interceptor_via_lib:C:Python39python3.dll
interceptor_via_lib:C:seklangDevOpsclangbinLLVM-13.0.0-win64libclang.0.0libwindowsclang_rt.asan_dynamic-x86_64.dll
interceptor_via_lib:C:WindowsSystem32KERNEL32.DLL
interceptor_via_lib:C:WindowsSYSTEM32ntdll.dll
interceptor_via_lib:clang_rt.asan_dynamic-x86_64.dll
interceptor_via_lib:ntdll
interceptor_via_lib:ntdll.dll
interceptor_via_lib:python3
interceptor_via_lib:python3.dll
interceptor_via_lib:KERNEL32
interceptor_via_lib:KERNEL32.dll

None of these seemed to work, what am I doing wrong? I tried full-path, forward-slash, backslash, dll names …

Info

LLVM 13, Windows 10

Source: Windows Questions

LEAVE A COMMENT