Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddressSanitizer: CHECK failed: asan_allocator.cpp:190 "((old)) == ((kAllocBegMagic))" #1801

Open
fawltylanguage opened this issue Sep 28, 2024 · 0 comments

Comments

@fawltylanguage
Copy link

I got the following error in my program with Clang 19.1.0:

AddressSanitizer: CHECK failed: asan_allocator.cpp:190 "((old)) == ((kAllocBegMagic))" (0xffffffffcc6e9601, 0xcc6e96b9cc6e96b9) (tid=452908)
    #0 0x55d2d2f97f31 in __asan::CheckUnwind() .../llvm/llvm-project-19.1.0.src/compiler-rt/lib/asan/asan_rtl.cpp:69:3
    #1 0x55d2d2fb2a82 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) .../llvm/llvm-proje\
ct-19.1.0.src/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5
    #2 0x55d2d2ef49ae in Set .../llvm/llvm-project-19.1.0.src/compiler-rt/lib/asan/asan_allocator.cpp:190:7
    #3 0x55d2d2ef49ae in __asan::QuarantineCallback::Recycle(__asan::AsanChunk*) const .../llvm/llvm-project-19.1.0.src/compiler-rt/lib/asan\
/asan_allocator.cpp:232:50
    #4 0x55d2d2ef46ec in __sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::DoRecycle(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCall\
\
back) .../llvm/llvm-project-19.1.0.src/compiler-rt/lib/asan/../sanitizer_common/sanitizer_quarantine.h:188:12
    #5 0x55d2d2ef431c in __sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Recycle(unsigned long, __asan::QuarantineCallback) /usr/local/env/amd64-linux-clang19-alma8\
\
/build/libs/llvm/llvm-project-19.1.0.src/compiler-rt/lib/asan/../sanitizer_common/sanitizer_quarantine.h:176:5
    #6 0x55d2d2ef65fd in __sanitizer::Quarantine<__asan::QuarantineCallback, __asan::AsanChunk>::Put(__sanitizer::QuarantineCache<__asan::QuarantineCallback>*, __asan::QuarantineCallback, \
\
__asan::AsanChunk*, unsigned long) .../llvm/llvm-project-19.1.0.src/compiler-rt/lib/asan/../sanitizer_common/sanitizer_quarantine.h:107:7
    #7 0x55d2d2f8d0bb in free .../llvm/llvm-project-19.1.0.src/compiler-rt/lib/asan/asan_malloc_linux.cpp:53:3
...

My program runs cleanly with Clang 18.1.6 ASAN. Still, it may be a bug in my program, but how can I find it? The malloc/free pair in my code seems to be OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant