[llvm-bugs] [Bug 49635] New: crash in X86 DAG->DAG Instruction Selection

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 18 14:39:04 PDT 2021


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

            Bug ID: 49635
           Summary: crash in X86 DAG->DAG Instruction Selection
           Product: libraries
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: attila at lendvai.name
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, pengfei.wang at intel.com,
                    spatel+llvm at rotateright.com

the issue could be triggered by calling llvm.sponentry with the wrong return
type?

clang -O3 -nostdlib -nostartfiles -Wl,-Bstatic -Qunused-arguments
--target=x86_64-linux-gnu -o build/llvm-linux/x86_64-linux-gnu/eval1 
build/llvm-linux/64bit-le/eval1.ll

warning: overriding the module target triple with x86_64-unknown-linux-gnu
[-Woverride-module]
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:
/nix/store/v8gdgd5pcxsk6hvx0g22h29py3yxj8hy-clang-11.0.0/bin/clang-11 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name eval1.ll -mrelocation-model pic -pic-level
2 -mframe-pointer=none -fmath-errno -fno-rounding-math -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -fno-split-dwarf-inlining
-debugger-tuning=gdb -nostdsysteminc -resource-dir
/nix/store/hy88qaagf54cywdsq9z051jlay93z45i-clang-wrapper-11.0.0/resource-root
-O3 -Wformat -Wformat-security -Werror=format-security -fdebug-compilation-dir
/home/alendvai/common-lisp/maru -ferror-limit 19 -fwrapv -stack-protector 2
-stack-protector-buffer-size 4 -fgnuc-version=4.2.1 -fcolor-diagnostics
-vectorize-loops -vectorize-slp -faddrsig -o /run/user/1000/eval1-84c867.o -x
ir build/llvm-linux/64bit-le/eval1.ll 
1.      Code generation
2.      Running pass 'Function Pass Manager' on module
'build/llvm-linux/64bit-le/eval1.ll'.
3.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@m__start.code'
 #0 0x00007f6e0b0846ca llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0xc436ca)
 #1 0x00007f6e0b082594 llvm::sys::RunSignalHandlers()
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0xc41594)
 #2 0x00007f6e0b0826d8 SignalHandler(int)
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0xc416d8)
 #3 0x00007f6e13717ee0 __restore_rt
(/nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libpthread.so.0+0x12ee0)
 #4 0x00007f6e0b7f8d57 llvm::SelectionDAG::SplitVector(llvm::SDValue const&,
llvm::SDLoc const&)
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0x13b7d57)
 #5 0x00007f6e0dc976fa llvm::X86TargetLowering::LowerOperation(llvm::SDValue,
llvm::SelectionDAG&) const
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0x38566fa)
 #6 0x00007f6e0b785598 (anonymous
namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*)
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0x1344598)
 #7 0x00007f6e0b79463e llvm::SelectionDAG::Legalize()
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0x135363e)
 #8 0x00007f6e0b8ed8c3 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0x14ac8c3)
 #9 0x00007f6e0b8f1a79
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0x14b0a79)
#10 0x00007f6e0b8f46dc
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0)
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0x14b36dc)
#11 0x00007f6e0db67bd9 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0x3726bd9)
#12 0x00007f6e0b42b7a4
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0xfea7a4)
#13 0x00007f6e0b1c6d20 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0xd85d20)
#14 0x00007f6e0b1c82f1 llvm::FPPassManager::runOnModule(llvm::Module&)
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0xd872f1)
#15 0x00007f6e0b1c5f68 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/nix/store/n5d2qmgpxyah76vd1cs04pbar277b75d-llvm-11.0.0-lib/lib/libLLVM-11.so+0xd84f68)
#16 0x00007f6e11928696 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/nix/store/4l1v1ckl4fcwyij5gasbq3bx00a6damd-clang-11.0.0-lib/lib/libclang-cpp.so.11+0x18af696)
#17 0x00007f6e11929ff6 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_delete<llvm::raw_pwrite_stream> >)
(/nix/store/4l1v1ckl4fcwyij5gasbq3bx00a6damd-clang-11.0.0-lib/lib/libclang-cpp.so.11+0x18b0ff6)
#18 0x00007f6e11c801a4 clang::CodeGenAction::ExecuteAction() (.part.0)
(/nix/store/4l1v1ckl4fcwyij5gasbq3bx00a6damd-clang-11.0.0-lib/lib/libclang-cpp.so.11+0x1c071a4)
#19 0x00007f6e12565279 clang::FrontendAction::Execute()
(/nix/store/4l1v1ckl4fcwyij5gasbq3bx00a6damd-clang-11.0.0-lib/lib/libclang-cpp.so.11+0x24ec279)
#20 0x00007f6e1251670b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/nix/store/4l1v1ckl4fcwyij5gasbq3bx00a6damd-clang-11.0.0-lib/lib/libclang-cpp.so.11+0x249d70b)
#21 0x00007f6e125f1630
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/nix/store/4l1v1ckl4fcwyij5gasbq3bx00a6damd-clang-11.0.0-lib/lib/libclang-cpp.so.11+0x2578630)
#22 0x000000000041596d cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
(/nix/store/v8gdgd5pcxsk6hvx0g22h29py3yxj8hy-clang-11.0.0/bin/clang-11+0x41596d)
#23 0x000000000041333b ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/nix/store/v8gdgd5pcxsk6hvx0g22h29py3yxj8hy-clang-11.0.0/bin/clang-11+0x41333b)
#24 0x0000000000410096 main
(/nix/store/v8gdgd5pcxsk6hvx0g22h29py3yxj8hy-clang-11.0.0/bin/clang-11+0x410096)
#25 0x00007f6e09f67cbd __libc_start_main
(/nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6+0x23cbd)
#26 0x0000000000412eda _start
(/nix/store/v8gdgd5pcxsk6hvx0g22h29py3yxj8hy-clang-11.0.0/bin/clang-11+0x412eda)
clang-11: error: unable to execute command: Segmentation fault (core dumped)
clang-11: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 11.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/v8gdgd5pcxsk6hvx0g22h29py3yxj8hy-clang-11.0.0/bin
clang-11: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.

-- 
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/20210318/7ad6b322/attachment.html>


More information about the llvm-bugs mailing list