Skip to content

clang version 14.0.6 compilation error 134 #71475

@Jedicus

Description

@Jedicus

I am attempting to compile from branch llvmorg-14.0.6 on Ubuntu 22.04 LTS with debugging assertions enabled and I've encountered the below error when executing make. I'm unsure of what to do from here. I'm happy to provide further details if needed.

clang++: /llvm-project/llvm/lib/Target/X86/X86FloatingPoint.cpp:1665: void {anonymous}::FPS::handleSpecialFP(llvm::MachineBasicBlock::iterator&): Assertion `(1 << getFPReg(MI.getOperand(I)) & STDefs) == 0 && "Operands with constraint \"f\" cannot overlap with defs"' failed.

...

clang-14: error: clang frontend command failed with exit code 134 (use -v to see invocation)

cmake command

~$ cmake -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lldb;openmp;lld" \
> -DLLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;libcxxabi;libunwind" \
> -DCMAKE_INSTALL_PREFIX=/path \
> -DLLVM_ENABLE_ASSERTIONS=ON \
> -DLLVM_ENABLE_RTTI=ON \
> -DCMAKE_BUILD_TYPE=Release \
> -G "Unix Makefiles" ../llvm

Stack dump

0.      Program arguments: /llvm/llvm-project/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/llvm/llvm-project/build/runtimes/runtimes-bins/libc/include -I/llvm/llvm-project/libc -I/llvm/llvm-project/build/runtimes/runtimes-bins/libc -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -ffunction-sections -fdata-sections -O3 -DNDEBUG -UNDEBUG -O2 -fpie -ffreestanding -DLLVM_LIBC_PUBLIC_PACKAGING -MD -MT libc/src/math/x86_64/CMakeFiles/libc.src.math.x86_64.cos.dir/cos.cpp.o -MF CMakeFiles/libc.src.math.x86_64.cos.dir/cos.cpp.o.d -o CMakeFiles/libc.src.math.x86_64.cos.dir/cos.cpp.o -c /llvm/llvm-project/libc/src/math/x86_64/cos.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '/llvm/llvm-project/libc/src/math/x86_64/cos.cpp'.
4.      Running pass 'X86 FP Stackifier' on function '@cos'
 #0 0x00005560a6b99d85 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x00005560a6b97a04 llvm::sys::CleanupOnSignal(unsigned long) (/llvm/llvm-project/build/./bin/clang+++0x3bf1a04)
 #2 0x00005560a6acc308 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007f642c424520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007f642c4789fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x00007f642c424476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x00007f642c40a7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x00007f642c40a71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #8 0x00007f642c41be96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #9 0x00005560a54ce08c (anonymous namespace)::FPS::handleSpecialFP(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&) X86FloatingPoint.cpp:0:0
#10 0x00005560a54cf932 (anonymous namespace)::FPS::processBasicBlock(llvm::MachineFunction&, llvm::MachineBasicBlock&) (.constprop.0) X86FloatingPoint.cpp:0:0
#11 0x00005560a54d17bb (anonymous namespace)::FPS::runOnMachineFunction(llvm::MachineFunction&) (.part.0) X86FloatingPoint.cpp:0:0
#12 0x00005560a5c891f8 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/llvm/llvm-project/build/./bin/clang+++0x2ce31f8)
#13 0x00005560a61ba1d3 llvm::FPPassManager::runOnFunction(llvm::Function&) (/llvm/llvm-project/build/./bin/clang+++0x32141d3)
#14 0x00005560a61ba409 llvm::FPPassManager::runOnModule(llvm::Module&) (/llvm/llvm-project/build/./bin/clang+++0x3214409)
#15 0x00005560a61bad05 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/llvm/llvm-project/build/./bin/clang+++0x3214d05)
#16 0x00005560a6f0f0ea clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/llvm/llvm-project/build/./bin/clang+++0x3f690ea)
#17 0x00005560a7d52262 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/llvm/llvm-project/build/./bin/clang+++0x4dac262)
#18 0x00005560a8904179 clang::ParseAST(clang::Sema&, bool, bool) (/llvm/llvm-project/build/./bin/clang+++0x595e179)
#19 0x00005560a763a089 clang::FrontendAction::Execute() (/llvm/llvm-project/build/./bin/clang+++0x4694089)
#20 0x00005560a75c5e4e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/llvm/llvm-project/build/./bin/clang+++0x461fe4e)
#21 0x00005560a76fdc58 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/llvm/llvm-project/build/./bin/clang+++0x4757c58)
#22 0x00005560a418c78b cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/llvm/llvm-project/build/./bin/clang+++0x11e678b)
#23 0x00005560a4188167 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#24 0x00005560a7442739 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#25 0x00005560a6acc49c llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/llvm/llvm-project/build/./bin/clang+++0x3b2649c)
#26 0x00005560a744305e 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) Job.cpp:0:0
#27 0x00005560a7411f22 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/llvm/llvm-project/build/./bin/clang+++0x446bf22)
#28 0x00005560a7412ac9 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/llvm/llvm-project/build/./bin/clang+++0x446cac9)
#29 0x00005560a7420ef9 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/llvm/llvm-project/build/./bin/clang+++0x447aef9)
#30 0x00005560a40b91f1 main (/llvm/llvm-project/build/./bin/clang+++0x11131f1)
#31 0x00007f642c40bd90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#32 0x00007f642c40be40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#33 0x00005560a4187ae5 _start (/llvm/llvm-project/build/./bin/clang+++0x11e1ae5)
clang-14: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /llvm/llvm-project/build/./bin
clang-14: note: diagnostic msg:
********************

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

********************
make[5]: *** [libc/src/math/x86_64/CMakeFiles/libc.src.math.x86_64.cos.dir/build.make:76: libc/src/math/x86_64/CMakeFiles/libc.src.math.x86_64.cos.dir/cos.cpp.o] Error 134
make[4]: *** [CMakeFiles/Makefile2:30823: libc/src/math/x86_64/CMakeFiles/libc.src.math.x86_64.cos.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:X86crashPrefer [crash-on-valid] or [crash-on-invalid]

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions