-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Open
Open
Copy link
Labels
backend:X86crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]generated by fuzzer
Description
Compiler Explorer: https://godbolt.org/z/sdEsMMTdv
- start crashing on clang 10.0.0
- generated by fuzzer
console:
<source>:2:30: warning: unknown attribute 'noclone' ignored; did you mean 'noinline'? [-Wunknown-attributes]
2 | int __attribute__((noinline, noclone)) test(double y) {
| ^~~~~~~
| noinline
fatal error: error in backend: Nested variants found in inline asm string: 'fis$(tp$(l ($1)$| DWORD PTR [$1]$)
mov$(l ($1), $0$| $0, DWORD PTR [$1]$)'
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/clang -gdwarf-4 -g -o /app/output.s -fno-verbose-asm -c --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics -O2 <source>
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '<source>'.
4. Running pass 'X86 Assembly Printer' on function '@test'
#0 0x0000000003fbcfa8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3fbcfa8)
#1 0x0000000003fba3d4 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3fba3d4)
#2 0x0000000003eff106 llvm::CrashRecoveryContext::HandleExit(int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3eff106)
#3 0x0000000003fb18be llvm::sys::Process::Exit(int, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3fb18be)
#4 0x0000000000d9b940 LLVMErrorHandler(void*, char const*, bool) cc1_main.cpp:0:0
#5 0x0000000003f09f63 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3f09f63)
#6 0x0000000004f3f7fd llvm::AsmPrinter::emitInlineAsm(llvm::MachineInstr const*) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4f3f7fd)
#7 0x0000000004f38149 llvm::AsmPrinter::emitFunctionBody() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4f38149)
#8 0x00000000028f0824 llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x28f0824)
#9 0x00000000032c2873 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#10 0x00000000038eb15f llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x38eb15f)
#11 0x00000000038eb511 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x38eb511)
#12 0x00000000038ebd81 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x38ebd81)
#13 0x0000000004271c91 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4271c91)
#14 0x000000000496df03 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x496df03)
#15 0x00000000066638dc clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x66638dc)
#16 0x000000000496e308 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x496e308)
#17 0x0000000004c61c75 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4c61c75)
#18 0x0000000004bde97e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4bde97e)
#19 0x0000000004d55741 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4d55741)
#20 0x0000000000d9e07f cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd9e07f)
#21 0x0000000000d94c5a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#22 0x00000000049d59c9 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#23 0x0000000003eff044 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3eff044)
#24 0x00000000049d5fdf clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#25 0x0000000004997eed clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4997eed)
#26 0x0000000004998f7e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4998f7e)
#27 0x00000000049a1bc5 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x49a1bc5)
#28 0x0000000000d9a52f clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd9a52f)
#29 0x0000000000c4ea64 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xc4ea64)
#30 0x000075bb55029d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#31 0x000075bb55029e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#32 0x0000000000d94705 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd94705)
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Compiler returned: 70
code:
int __attribute__((noinline, noclone)) test(double y) {
int a, b;
asm("fis{tp{l (%1)| DWORD PTR [%1]}\n\tmov{l (%1), %0| %0, DWORD PTR [%1]}"
: "=r"(a)
: "r"(&b), "t"(y)
: "st");
return a;
}
int main() {
int t ;
if (test(t) != t)
__builtin_abort();
return 0;
}
Metadata
Metadata
Assignees
Labels
backend:X86crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]generated by fuzzer