Ellis Hoag via llvm-dev
2021-Nov-15 18:07 UTC
[llvm-dev] Broken LIT tests on Sanitizer Builds
I recently built with -DLLVM_USE_SANITIZER=Address, ran the LIT tests, and noticed we have at least two tests with memory bugs on main. Here are the commands I ran $ cmake -GNinja -DLLVM_ENABLE_PROJECTS="clang;" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_ASSERTIONS=On -DBUILD_SHARED_LIBS=On -DLLVM_USE_SANITIZER=Address ../llvm $ ninja check-llvm ... ==2157126==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7fb9f778c55f at pc 0x7fba0487419d bp 0x7ffe92a0a230 sp 0x7ffe92a099d8 READ of size 1 at 0x7fb9f778c55f thread T0 #0 0x7fba0487419c (/lib64/libasan.so.5+0xad19c) #1 0x7fb9e7bcc439 in llvm::StringRef::strLen(char const*) /home/ellishoag/local/repos/llvm-project/llvm/include/llvm/ADT/StringRef.h:86 #2 0x7fb9e7bcc439 in llvm::StringRef::StringRef(char const*) /home/ellishoag/local/repos/llvm-project/llvm/include/llvm/ADT/StringRef.h:108 #3 0x7fb9e7bcc439 in getMnemonic /home/ellishoag/local/repos/llvm-project/llvm/lib/MC/MCAsmStreamer.cpp:159 ... Failed Tests (2): LLVM :: CodeGen/AArch64/machine-outliner-remarks.ll LLVM :: CodeGen/X86/x86-shrink-wrapping.ll I think check-clang also has some broken tests. Should we be running these checks in https://lab.llvm.org/buildbot/ ? I'm not super familiar with this site, but it seems that we have asan builds, but that we don't run check-llvm or check-clang. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211115/e896fed3/attachment.html>
Mitch Phillips via llvm-dev
2021-Nov-15 18:11 UTC
[llvm-dev] Broken LIT tests on Sanitizer Builds
Hi Ellis, Are you building using GCC as the host compiler? I can't say that building clang with gcc-ASan is a well tested (or well-supported) configuration. We do have ASan buildbots that run check-all, but the host compiler is clang: https://lab.llvm.org/buildbot/#/builders/168/builds/3354/steps/12/logs/stdio Thanks, Mitch. On Mon, Nov 15, 2021 at 10:08 AM Ellis Hoag via llvm-dev < llvm-dev at lists.llvm.org> wrote:> I recently built with -DLLVM_USE_SANITIZER=Address, ran the LIT tests, > and noticed we have at least two tests with memory bugs on main. Here are > the commands I ran > > > $ cmake -GNinja -DLLVM_ENABLE_PROJECTS="clang;" > -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_ASSERTIONS=On > -DBUILD_SHARED_LIBS=On -DLLVM_USE_SANITIZER=Address ../llvm > $ ninja check-llvm > ... > ==2157126==ERROR: AddressSanitizer: global-buffer-overflow on address > 0x7fb9f778c55f at pc 0x7fba0487419d bp 0x7ffe92a0a230 sp 0x7ffe92a099d8 > READ of size 1 at 0x7fb9f778c55f thread T0 > #0 0x7fba0487419c (/lib64/libasan.so.5+0xad19c) > #1 0x7fb9e7bcc439 in llvm::StringRef::strLen(char const*) > /home/ellishoag/local/repos/llvm-project/llvm/include/llvm/ADT/StringRef.h:86 > #2 0x7fb9e7bcc439 in llvm::StringRef::StringRef(char const*) > /home/ellishoag/local/repos/llvm-project/llvm/include/llvm/ADT/StringRef.h:108 > #3 0x7fb9e7bcc439 in getMnemonic > /home/ellishoag/local/repos/llvm-project/llvm/lib/MC/MCAsmStreamer.cpp:159 > ... > Failed Tests (2): > LLVM :: CodeGen/AArch64/machine-outliner-remarks.ll > LLVM :: CodeGen/X86/x86-shrink-wrapping.ll > > > I think check-clang also has some broken tests. Should we be running these > checks in https://lab.llvm.org/buildbot/ ? I'm not super familiar with > this site, but it seems that we have asan builds, but that we don't run > check-llvm or check-clang. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211115/ca8f2ac4/attachment-0001.html>