The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
28.96k
stars
11.94k
forks
source link
LeakSanitizer detected memory leaks in malloc (build_sanitizer/llvm/bin/clang-20+0x105632ae) #102289
Open
vrukesh opened 3 months ago
LeakSanitizer: detected memory leaks . Vulnerability location: malloc (/home/vrukesh/LLVM-embedded-toolchain-for-Arm/build_sanitizer/llvm/bin/clang-20+0x105632ae)
Steps to reproduce:
cd LLVM-embedded-toolchain-for-Arm mkdir build_sanitizer; cd build_sanitizer; export CCACHE_DISABLE=1 cmake .. -GNinja -DFETCHCONTENT_QUIET=OFF -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER="Address;Undefined" -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ninja llvm-toolchain ninja check-llvm-toolchain ninja check-cxx
Expected behavior We do not observe any memory leaks.
Observed result We observe memory leaks. Complete snippet is:
`================================================================ ==4061127==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 2808 byte(s) in 13 object(s) allocated from:
0 0x55b9889852ae in malloc (/home/vrukesh/LLVM-embedded-toolchain-for-Arm/build_sanitizer/llvm/bin/clang-20+0x105632ae) (BuildId: a3166faab09d81d8)
SUMMARY: AddressSanitizer: 2808 byte(s) leaked in 13 allocation(s). error: command failed with exit status: 1`