You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/ioctl-8c74cc.c
clang: note: diagnostic msg: /tmp/ioctl-8c74cc.sh
clang: note: diagnostic msg:
Extended Description
Original issue: ClangBuiltLinux/linux#571
When building the file fs/ext4/ioctl.c in the Linux kernel (https://github.com/torvalds/linux/blob/v5.2/fs/ext4/ioctl.c), we see the following crash:
#0 0x00007f7b606524ff llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xb394ff)
#1 0x00007f7b60650940 llvm::sys::RunSignalHandlers() (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xb37940)
#2 0x00007f7b60652901 (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xb39901)
#3 0x00007f7b63c8f730 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
#4 0x00007f7b61ec2753 llvm::MipsSEDAGToDAGISel::SelectInlineAsmMemoryOperand(llvm::SDValue const&, unsigned int, std::vector<llvm::SDValue, std::allocatorllvm::SDValue >&) (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0x23a9753)
#5 0x00007f7b60c060b7 llvm::SelectionDAGISel::SelectInlineAsmMemoryOperands(std::vector<llvm::SDValue, std::allocatorllvm::SDValue >&, llvm::SDLoc const&) (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0x10ed0b7)
#6 0x00007f7b60c06a14 llvm::SelectionDAGISel::Select_INLINEASM(llvm::SDNode*, bool) (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0x10eda14)
#7 0x00007f7b60c03ac7 llvm::SelectionDAGISel::DoInstructionSelection() (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0x10eaac7)
#8 0x00007f7b60c03170 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0x10ea170)
#9 0x00007f7b60c02837 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0x10e9837)
#10 0x00007f7b60c00226 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0x10e7226)
#11 0x00007f7b61e900da llvm::MipsDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0x23770da)
#12 0x00007f7b608d6428 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xdbd428)
#13 0x00007f7b6074ecf6 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xc35cf6)
#14 0x00007f7b6074efa3 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xc35fa3)
#15 0x00007f7b6074f44a llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0xc3644a)
#16 0x00000000007253a6 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (/usr/lib/llvm-9/bin/clang+0x7253a6)
#17 0x0000000000de35fd (/usr/lib/llvm-9/bin/clang+0xde35fd)
#18 0x0000000001296133 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm-9/bin/clang+0x1296133)
#19 0x0000000000b5b28f clang::FrontendAction::Execute() (/usr/lib/llvm-9/bin/clang+0xb5b28f)
#20 0x0000000000b181b1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm-9/bin/clang+0xb181b1)
#21 0x0000000000be4d60 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm-9/bin/clang+0xbe4d60)
#22 0x00000000006eda30 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm-9/bin/clang+0x6eda30)
#23 0x00000000006ebe40 main (/usr/lib/llvm-9/bin/clang+0x6ebe40)
#24 0x00007f7b5f65b09b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409b)
#25 0x00000000006e917a _start (/usr/lib/llvm-9/bin/clang+0x6e917a)
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 9.0.0-svn364127-1
exp1+020190622095755.118~1.gbp9b9451 (trunk)Target: mipsel-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/ioctl-8c74cc.c
clang: note: diagnostic msg: /tmp/ioctl-8c74cc.sh
clang: note: diagnostic msg:
I creduce'd it down to:
a() { asm("" : "=ro"(*(int *)0)); }
with the following interestingness test:
#!/bin/bash
mipsel-linux-gnu-gcc -O2 -c -o /dev/null ioctl.i || exit 1
clang-9 -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -std=gnu89 --target=mipsel-linux-gnu --prefix=/usr/bin/ --gcc-toolchain=/usr -no-integrated-as -mno-check-zero-division -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -Wa,-msoft-float -ffreestanding -EL -fno-stack-check -march=mips32r2 -Wa,--trap -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 -fstack-protector-strong -mno-global-merge -fomit-frame-pointer -g -fno-var-tracking -fno-strict-overflow -fno-merge-all-constants -fno-stack-check -c -o /dev/null ioctl.i |& grep "llvm::MipsSEDAGToDAGISel::SelectInlineAsmMemoryOperand"
The text was updated successfully, but these errors were encountered: