[llvm-bugs] [Bug 39815] New: PowerPC64: Code hits SEGV during PPCDAGToDAGISel pass

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 27 17:19:11 PST 2018


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

            Bug ID: 39815
           Summary: PowerPC64: Code hits SEGV during PPCDAGToDAGISel pass
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: anton at samba.org
                CC: hfinkel at anl.gov, kit.barton at gmail.com,
                    llvm-bugs at lists.llvm.org, nemanja.i.ibm at gmail.com

The following test case:

char a;
long *b;
c() { a = *b + (0 != b) & 5; }

Hits a SEGV on trunk: 

Stack dump:
0.      Program arguments: /home/anton/source/llvm.install/bin/clang-7.0 -cc1
-triple powerpc64le-unknown-linux-gnu -emit-obj -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name crash1_reduce.c
-mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu ppc64le
-mfloat-abi hard -target-abi elfv2 -dwarf-column-info -debugger-tuning=gdb
-momit-leaf-frame-pointer -resource-dir
/home/anton/source/llvm.install/lib/clang/8.0.0 -internal-isystem
/usr/local/include -internal-isystem
/home/anton/source/llvm.install/lib/clang/8.0.0/include
-internal-externc-isystem /usr/include/powerpc64le-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-fdebug-compilation-dir /home/anton/source/csmith -ferror-limit 19
-fmessage-length 188 -fno-signed-char -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/crash1_reduce-4c2909.o -x
c 61/crash1_reduce.c -faddrsig 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '61/crash1_reduce.c'.
4.      Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on
function '@c'
LLVMSymbolizer: error reading file: No such file or directory
#0 0x0000000130c59654 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/anton/source/llvm/lib/Support/Unix/Signals.inc:495:0
#1 0x0000000130c59770 PrintStackTraceSignalHandler(void*)
/home/anton/source/llvm/lib/Support/Unix/Signals.inc:558:0
#2 0x0000000130c577c8 llvm::sys::RunSignalHandlers()
/home/anton/source/llvm/lib/Support/Signals.cpp:66:0
#3 0x0000000130c579c4 SignalHandler(int)
/home/anton/source/llvm/lib/Support/Unix/Signals.inc:348:0
#4 0x00007fff88a704e8 (linux-vdso64.so.1+0x4e8)
#5 0x000000013173f8c8 llvm::SDNode::getValueType(unsigned int) const
/home/anton/source/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:969:0
#6 0x000000013173f8c8 llvm::SDValue::getValueType() const
/home/anton/source/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1116:0
#7 0x000000013173f8c8
llvm::DAGTypeLegalizer::PromoteIntRes_SimpleIntBinOp(llvm::SDNode*)
/home/anton/source/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:724:0
#8 0x000000013174a51c
llvm::DAGTypeLegalizer::PromoteIntegerResult(llvm::SDNode*, unsigned int)
/home/anton/source/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:126:0
#9 0x00000001316b8a84 llvm::DAGTypeLegalizer::run()
/home/anton/source/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:253:0
#10 0x00000001316b9234 llvm::SelectionDAG::LegalizeTypes()
/home/anton/source/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:1115:0
#11 0x000000013166f658 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
/home/anton/source/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:776:0
#12 0x000000013166fd78
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
false, false, void>, false, true>,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false,
false, void>, false, true>, bool&)
/home/anton/source/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:669:0
#13 0x00000001316752e8
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
/home/anton/source/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1784:0
#14 0x0000000131677be8
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.827)
/home/anton/source/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:471:0
#15 0x000000012fedb0cc (anonymous
namespace)::PPCDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/home/anton/source/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:153:0
#16 0x00000001302c6fb0
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.40)
/home/anton/source/llvm/lib/CodeGen/MachineFunctionPass.cpp:74:0
#17 0x00000001306a30d8 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/anton/source/llvm/lib/IR/LegacyPassManager.cpp:1644:0
#18 0x00000001306a31f8 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/anton/source/llvm/lib/IR/LegacyPassManager.cpp:1679:0
#19 0x00000001306a2238 runOnModule
/home/anton/source/llvm/lib/IR/LegacyPassManager.cpp:1744:0
#20 0x00000001306a2238 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/anton/source/llvm/lib/IR/LegacyPassManager.cpp:1857:0
#21 0x00000001306a25ec llvm::legacy::PassManager::run(llvm::Module&)
/home/anton/source/llvm/lib/IR/LegacyPassManager.cpp:1888:0
#22 0x0000000130e93d6c EmitAssembly
/home/anton/source/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:872:0
#23 0x0000000130e93d6c 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> >)
/home/anton/source/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1300:0
#24 0x000000013175eb9c
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
/home/anton/source/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:293:0
#25 0x00000001323db788 clang::ParseAST(clang::Sema&, bool, bool)
/home/anton/source/llvm/tools/clang/lib/Parse/ParseAST.cpp:170:0
#26 0x00000001313a39c8 clang::ASTFrontendAction::ExecuteAction()
/home/anton/source/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1018:0
#27 0x000000013175dc04 clang::CodeGenAction::ExecuteAction()
/home/anton/source/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1044:0
#28 0x00000001313a8338 clang::FrontendAction::Execute()
/home/anton/source/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:917:0
#29 0x000000013136a040
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/anton/source/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:968:0
#30 0x0000000131481204
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/anton/source/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:267:0
#31 0x000000012fe62648 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /home/anton/source/llvm/tools/clang/tools/driver/cc1_main.cpp:219:0
#32 0x000000012fe07290 ExecuteCC1Tool
/home/anton/source/llvm/tools/clang/tools/driver/driver.cpp:310:0
#33 0x000000012fe07290 main
/home/anton/source/llvm/tools/clang/tools/driver/driver.cpp:382:0
#34 0x00007fff883b441c generic_start_main
/build/glibc-uvws04/glibc-2.27/csu/../csu/libc-start.c:310:0
#35 0x00007fff883b4618 __libc_start_main
/build/glibc-uvws04/glibc-2.27/csu/../sysdeps/unix/sysv/linux/powerpc/libc-start.c:116:0
clang-7: error: unable to execute command: Segmentation fault (core dumped)
clang-7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 8.0.0 (git://github.com/llvm-mirror/clang.git
8908dd12e7bbfc74e264233e900206ad31e285f0)
(git://github.com/llvm-mirror/llvm.git
b72b8f22f006d1ead794faf328b359a9c0d393b9)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/anton/source/llvm.install/bin
clang-7: 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-7: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-7: note: diagnostic msg: /tmp/crash1_reduce-8ddc9a.c
clang-7: note: diagnostic msg: /tmp/crash1_reduce-8ddc9a.sh
clang-7: 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/20181128/40dddfb9/attachment.html>


More information about the llvm-bugs mailing list