[llvm-bugs] [Bug 47678] New: check-clang fails when trunk is built with LLVM_USE_SANITIZER=Address
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 29 04:13:22 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47678
Bug ID: 47678
Summary: check-clang fails when trunk is built with
LLVM_USE_SANITIZER=Address
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: bryanpkc at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
After cloning trunk on Ubuntu 20.04 (x86_64), and building with GCC 9.3.0, with
AddressSanitizer enabled, "ninja check-clang" results in a huge number of
failures:
Failed Tests (342):
Clang :: AST/ast-print-record-decl.c
Clang :: AST/attr-print-emit.cpp
Clang :: Analysis/analyzer-enabled-checkers.c
Clang :: Analysis/builtin_signbit.cpp
Clang :: Analysis/global-region-invalidation.c
Clang :: Analysis/invalid-a-na-ly-zer-con-fig-value.c
Clang :: Analysis/invalid-analyzer-config-value.c
.
.
Clang :: SemaCXX/constexpr-depth.cpp
Clang :: SemaCXX/constexpr-steps.cpp
Clang :: SemaCXX/operator-arrow-depth.cpp
Clang :: SemaCXX/warn-unused-local-typedef-serialize.cpp
Clang :: SemaObjC/class-stub-attr-unsupported.m
Clang :: SemaObjC/class-stub-attr.m
Clang :: SemaObjC/opaque-is-access-warn.m
Clang :: SemaObjC/opaque-is-access.m
Clang :: SemaObjC/warn-unreachable.m
Clang :: SemaTemplate/instantiation-depth.cpp
Clang :: Tooling/pch.cpp
********************
Unexpectedly Passed Tests (2):
Clang :: Driver/XRay/xray-instrument-cpu.c
Clang :: Driver/XRay/xray-instrument-os.c
Testing Time: 2967.10s
Unsupported : 708
Passed : 25634
Expectedly Failed : 22
Failed : 342
Unexpectedly Passed: 2
The ASan failures can be reproduced by simply compiling helloworld.c with the
newly built clang:
$ echo 'int main() { return 0; }' | ./bin/clang -x c -c -o /dev/null -
=================================================================
==2758511==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 192 byte(s) in 1 object(s) allocated from:
#0 0x7fc4e9840947 in operator new(unsigned long)
(/lib/x86_64-linux-gnu/libasan.so.5+0x10f947)
#1 0x5558175af399 in std::_MakeUniq<clang::EmitObjAction>::__single_object
std::make_unique<clang::EmitObjAction>()
/usr/include/c++/9/bits/unique_ptr.h:857
#2 0x5558175af399 in CreateFrontendBaseAction
/home/bryanpkc/src/llvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:59
#3 0x5558175af399 in clang::CreateFrontendAction(clang::CompilerInstance&)
/home/bryanpkc/src/llvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:139
#4 0x5558175b411f in
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/bryanpkc/src/llvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:275
#5 0x55580fb41e65 in cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /home/bryanpkc/src/llvm/llvm-project/clang/tools/driver/cc1_main.cpp:240
#6 0x55580fb3201d in ExecuteCC1Tool
/home/bryanpkc/src/llvm/llvm-project/clang/tools/driver/driver.cpp:330
#7 0x5558169d0657 in operator()
/home/bryanpkc/src/llvm/llvm-project/clang/lib/Driver/Job.cpp:400
#8 0x5558169d0657 in
callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::string*, bool*) const::<lambda()> >
/home/bryanpkc/src/llvm/llvm-project/llvm/include/llvm/ADT/STLExtras.h:185
#9 0x5558147c1cf1 in llvm::function_ref<void ()>::operator()() const
/home/bryanpkc/src/llvm/llvm-project/llvm/include/llvm/ADT/STLExtras.h:203
#10 0x5558147c1cf1 in
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
/home/bryanpkc/src/llvm/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:424
#11 0x5558169d8a1f in
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const
/home/bryanpkc/src/llvm/llvm-project/clang/lib/Driver/Job.cpp:400
#12 0x555816904448 in
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
/home/bryanpkc/src/llvm/llvm-project/clang/lib/Driver/Compilation.cpp:195
#13 0x555816907995 in
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
/home/bryanpkc/src/llvm/llvm-project/clang/lib/Driver/Compilation.cpp:246
#14 0x55581694da96 in
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
/home/bryanpkc/src/llvm/llvm-project/clang/lib/Driver/Driver.cpp:1510
#15 0x55580f89d6c4 in main
/home/bryanpkc/src/llvm/llvm-project/clang/tools/driver/driver.cpp:502
#16 0x7fc4e91f00b2 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
Indirect leak of 196620 byte(s) in 1 object(s) allocated from:
#0 0x7fc4e983edc6 in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10ddc6)
#1 0x55581484e99d in llvm::safe_calloc(unsigned long, unsigned long)
/home/bryanpkc/src/llvm/llvm-project/llvm/include/llvm/Support/MemAlloc.h:40
#2 0x55581484e99d in llvm::StringMapImpl::init(unsigned int)
/home/bryanpkc/src/llvm/llvm-project/llvm/lib/Support/StringMap.cpp:58
#3 0x55582272efaf in llvm::StringMap<clang::IdentifierInfo*,
llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul>
>::StringMap(unsigned int)
/home/bryanpkc/src/llvm/llvm-project/llvm/include/llvm/ADT/StringMap.h:115
.
.
"ninja check-llvm" reports no failures.
The build was configured fairly simply:
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=$PWD/../install \
-DCMAKE_C_FLAGS="-U_FORTIFY_SOURCE" \
-DCMAKE_CXX_FLAGS="-UFORTIFY_SOURCE" \
-DLLVM_ENABLE_PROJECTS="clang;compiler-rt" \
-DLLVM_TARGETS_TO_BUILD="X86" \
-DLLVM_USE_SANITIZER=Address \
../llvm
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200929/1c363297/attachment-0001.html>
More information about the llvm-bugs
mailing list