llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.01k stars 11.06k forks source link

Compiling simple programs with -fsanitize=address on Windows fails #42663

Open llvmbot opened 4 years ago

llvmbot commented 4 years ago
Bugzilla Link 43318
Version 8.0
OS Windows NT
Reporter LLVM Bugzilla Contributor

Extended Description

Reproduce:

main.cpp: int main(int argc, char *argv[]) { return 0; }

command: clang++ -fsanitize=address main.cpp

Compilation was done from a regular cmd command prompt (not a visual studio developer prompt, although doing that gives the same result)

output:

==10448==AddressSanitizer CHECK failed: C:\src\llvm_package_801-final\llvm\projects\compiler-rt\lib\asan\asan_rtl.cc:402 "((!asan_init_is_running && "ASan init calls itself!")) != (0)" (0x0, 0x0) ==10448==AddressSanitizer CHECK failed: C:\src\llvm_package_801-final\llvm\projects\compiler-rt\lib\asan\asan_poisoning.cc:37 "((AddrIsInMem(addr))) != (0)" (0x0, 0x0)

Platform: Windows 10 Version: 1903 OS build: 18362.356

clang++ --version:

clang version 8.0.1 (tags/RELEASE_801/final) Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: C:\Users\daan\scoop\apps\llvm\current\bin

Visual Studio: Visual Studio Build Tools 2019 Version: 16.2.4

llvmbot commented 4 years ago

I cannot reproduce this with the latest RC (5) so I'm assuming it has been fixed. I'm not sure if this bug report is valid if it only applies to a (soon to be) old version of clang/llvm. Feel free to close it if it isn't.