[llvm-bugs] [Bug 48874] New: Clang crashes when trying to build llvm on centos 7

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 25 08:38:06 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=48874

            Bug ID: 48874
           Summary: Clang crashes when trying to build llvm on centos 7
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vincent.lebourlot at starqube.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

While building llvm using clang 12 build with gcc, clang crashes when checking
for atomic support. 

/usr/local/bin/clang++ -DHAVE_CXX_ATOMICS_WITHOUT_LIB -D_GNU_SOURCE 
-stdlib=libc++  -Werror=unguarded-availability-new -std=c++11 -std=c++14 -MD
-MT CMakeFiles/cmTC_c8a90.dir/src.cxx.o -MF
CMakeFiles/cmTC_c8a90.dir/src.cxx.o.d -o CMakeFiles/cmTC_c8a90.dir/src.cxx.o -c
src.cxx
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/local/bin/clang++
-DHAVE_CXX_ATOMICS_WITHOUT_LIB -D_GNU_SOURCE -stdlib=libc++
-Werror=unguarded-availability-new -std=c++11 -std=c++14 -MD -MT
CMakeFiles/cmTC_c8a90.dir/src.cxx.o -MF CMakeFiles/cmTC_c8a90.dir/src.cxx.o.d
-o CMakeFiles/cmTC_c8a90.dir/src.cxx.o -c src.cxx
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      /usr/local/bin/../include/c++/v1/atomic:1049:5: Generating code for
declaration 'std::__cxx_atomic_fetch_add'
 #0 0x0000557ee51c7f00 PrintStackTraceSignalHandler(void*) (.lto_priv.0)
(/usr/local/bin/clang+++0x1674f00)
 #1 0x0000557ee51ac1c4 llvm::sys::CleanupOnSignal(unsigned long)
(/usr/local/bin/clang+++0x16591c4)
 #2 0x0000557ee51668a8 CrashRecoverySignalHandler(int)
(/usr/local/bin/clang+++0x16138a8)
 #3 0x00007fa935f9e630 __restore_rt (/lib64/libpthread.so.0+0xf630)
 #4 0x0000557ee4cbdba7 llvm::SwitchInst::init(llvm::Value*, llvm::BasicBlock*,
unsigned int) (/usr/local/bin/clang+++0x116aba7)
 #5 0x0000557ee74c9a42 llvm::IRBuilderBase::CreateSwitch(llvm::Value*,
llvm::BasicBlock*, unsigned int, llvm::MDNode*, llvm::MDNode*) (.constprop.0)
(/usr/local/bin/clang+++0x3976a42)
 #6 0x0000557ee5507892
clang::CodeGen::CodeGenFunction::EmitAtomicExpr(clang::AtomicExpr*)
(/usr/local/bin/clang+++0x19b4892)
 #7 0x0000557ee560cded clang::StmtVisitorBase<std::add_pointer, (anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) (.lto_priv.0)
(/usr/local/bin/clang+++0x1ab9ded)
 #8 0x0000557ee7464716
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool)
(.constprop.0) (/usr/local/bin/clang+++0x3911716)
 #9 0x0000557ee53fd665
clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&)
(/usr/local/bin/clang+++0x18aa665)
#10 0x0000557ee543706a
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) (/usr/local/bin/clang+++0x18e406a)
#11 0x0000557ee544b37f
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*)
(/usr/local/bin/clang+++0x18f837f)
#12 0x0000557ee548d533
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
(/usr/local/bin/clang+++0x193a533)
#13 0x0000557ee548db40
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/usr/local/bin/clang+++0x193ab40)
#14 0x0000557ee548e335
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/usr/local/bin/clang+++0x193b335)
#15 0x0000557ee5492c36 clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/local/bin/clang+++0x193fc36)
#16 0x0000557ee5492c4e clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/local/bin/clang+++0x193fc4e)
#17 0x0000557ee5492c4e clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/local/bin/clang+++0x193fc4e)
#18 0x0000557ee5492df9 clang::CodeGen::CodeGenModule::Release()
(/usr/local/bin/clang+++0x193fdf9)
#19 0x0000557ee5cef26a (anonymous
namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/bin/clang+++0x219c26a)
#20 0x0000557ee5cee5a8
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/bin/clang+++0x219b5a8)
#21 0x0000557ee660e8a9 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/bin/clang+++0x2abb8a9)
#22 0x0000557ee57d8fa9 clang::FrontendAction::Execute()
(/usr/local/bin/clang+++0x1c85fa9)
#23 0x0000557ee58204af
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/bin/clang+++0x1ccd4af)
#24 0x0000557ee58c77dc
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/bin/clang+++0x1d747dc)
#25 0x0000557ee44e2062 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/bin/clang+++0x98f062)
#26 0x0000557ee44e7ced ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/usr/local/bin/clang+++0x994ced)
#27 0x0000557ee741e3aa
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(.constprop.0) (/usr/local/bin/clang+++0x38cb3aa)
#28 0x0000557ee5748dc0
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const (.part.0)
(/usr/local/bin/clang+++0x1bf5dc0)
#29 0x0000557ee56faa42
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const (/usr/local/bin/clang+++0x1ba7a42)
#30 0x0000557ee56fae49
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/usr/local/bin/clang+++0x1ba7e49)
#31 0x0000557ee56faf69
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/usr/local/bin/clang+++0x1ba7f69)
#32 0x0000557ee443d08a main (/usr/local/bin/clang+++0x8ea08a)
#33 0x00007fa9352ab555 __libc_start_main (/lib64/libc.so.6+0x22555)
#34 0x0000557ee448d46e _start (/usr/local/bin/clang+++0x93a46e)
clang-12: error: clang frontend command failed with exit code 139 (use -v to
see invocation)
clang version 12.0.0 (/home/vlb/Downloads/llvm-project/clang
3546b372219db5c5f4004da6a0066bb9860d3d37)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-12: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/src-937661.cpp
clang-12: note: diagnostic msg: /tmp/src-937661.sh
clang-12: note: diagnostic msg:

********************

-- 
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/20210125/05eea537/attachment.html>


More information about the llvm-bugs mailing list