Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Assertion failure in X86RegisterInfo.cpp #30940

Open Quuxplusone opened 7 years ago

Quuxplusone commented 7 years ago
Bugzilla Link PR31967
Status NEW
Importance P normal
Reported by Nick Clifton (nickc@redhat.com)
Reported on 2017-02-15 05:08:18 -0800
Last modified on 2017-03-27 13:02:13 -0700
Version trunk
Hardware PC Linux
CC llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk
Fixed by commit(s)
Attachments 20031023-4-a555f4.c (65448 bytes, text/x-csrc)
20031023-4-a555f4.sh (1896 bytes, application/x-shellscript)
Blocks
Blocked by
See also
Created attachment 17980
Preprocessed test case.

Compiling the attached test case with the attached command line produces the
following assertion failure when running clang built from trunk (15 Feb 2017):

clang-4.0: /work/sources/llvm/current/lib/Target/X86/X86RegisterInfo.cpp:735:
virtual void
llvm::X86RegisterInfo::eliminateFrameIndex(llvm::MachineBasicBlock::iterator,
int, unsigned int, llvm::RegScavenger*) const: Assertion `(!Is64Bit ||
isInt<32>((long long)FIOffset + Imm)) && "Requesting 64-bit offset in 32-bit
immediate!"' failed.

The stack backtrace looks like this:

#0 0x00000000034cc20c llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/work/sources/llvm/current/lib/Support/Unix/Signals.inc:402:0
#1 0x00000000034cc29f PrintStackTraceSignalHandler(void*)
/work/sources/llvm/current/lib/Support/Unix/Signals.inc:466:0
#2 0x00000000034ca802 llvm::sys::RunSignalHandlers()
/work/sources/llvm/current/lib/Support/Signals.cpp:44:0
#3 0x00000000034cbb83 SignalHandler(int)
/work/sources/llvm/current/lib/Support/Unix/Signals.inc:256:0
#4 0x00007ff04c73e5c0 __restore_rt (/lib64/libpthread.so.0+0x115c0)
#5 0x00007ff04b2a691f __GI_raise /usr/src/debug/glibc-2.24-33-
ge9e69e4/signal/../sysdeps/unix/sysv/linux/raise.c:58:0
#6 0x00007ff04b2a851a __GI_abort /usr/src/debug/glibc-2.24-33-
ge9e69e4/stdlib/abort.c:91:0
#7 0x00007ff04b29eda7 __assert_fail_base /usr/src/debug/glibc-2.24-33-
ge9e69e4/assert/assert.c:92:0
#8 0x00007ff04b29ee52 (/lib64/libc.so.6+0x2de52)
#9 0x00000000024b8794
llvm::X86RegisterInfo::eliminateFrameIndex(llvm::MachineInstrBundleIterator<llvm::MachineInstr,
false>, int, unsigned int, llvm::RegScavenger*) const
/work/sources/llvm/current/lib/Target/X86/X86RegisterInfo.cpp:734:0
#10 0x0000000002b9ec6a (anonymous
namespace)::PEI::replaceFrameIndices(llvm::MachineBasicBlock*,
llvm::MachineFunction&, int&)
/work/sources/llvm/current/lib/CodeGen/PrologEpilogInserter.cpp:1128:0
#11 0x0000000002b9e50d (anonymous
namespace)::PEI::replaceFrameIndices(llvm::MachineFunction&)
/work/sources/llvm/current/lib/CodeGen/PrologEpilogInserter.cpp:1032:0
#12 0x0000000002b9b0ea (anonymous
namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&)
/work/sources/llvm/current/lib/CodeGen/PrologEpilogInserter.cpp:222:0
#13 0x0000000002ad4554
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/work/sources/llvm/current/lib/CodeGen/MachineFunctionPass.cpp:62:0
#14 0x0000000002e90afb llvm::FPPassManager::runOnFunction(llvm::Function&)
/work/sources/llvm/current/lib/IR/LegacyPassManager.cpp:1513:0
#15 0x0000000002e90c72 llvm::FPPassManager::runOnModule(llvm::Module&)
/work/sources/llvm/current/lib/IR/LegacyPassManager.cpp:1534:0
#16 0x0000000002e90fbf (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/work/sources/llvm/current/lib/IR/LegacyPassManager.cpp:1590:0
#17 0x0000000002e91673 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/work/sources/llvm/current/lib/IR/LegacyPassManager.cpp:1693:0
#18 0x0000000002e9186b llvm::legacy::PassManager::run(llvm::Module&)
/work/sources/llvm/current/lib/IR/LegacyPassManager.cpp:1725:0
#19 0x000000000375dc11 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
/work/sources/llvm/current/tools/clang/lib/CodeGen/BackendUtil.cpp:727:0
#20 0x000000000375f48d 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> >)
/work/sources/llvm/current/tools/clang/lib/CodeGen/BackendUtil.cpp:997:0
#21 0x000000000415fc85
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
/work/sources/llvm/current/tools/clang/lib/CodeGen/CodeGenAction.cpp:243:0
#22 0x0000000004d50f21 clang::ParseAST(clang::Sema&, bool, bool)
/work/sources/llvm/current/tools/clang/lib/Parse/ParseAST.cpp:161:0
#23 0x0000000003d0e575 clang::ASTFrontendAction::ExecuteAction()
/work/sources/llvm/current/tools/clang/lib/Frontend/FrontendAction.cpp:568:0
#24 0x000000000415de26 clang::CodeGenAction::ExecuteAction()
/work/sources/llvm/current/tools/clang/lib/CodeGen/CodeGenAction.cpp:973:0
#25 0x0000000003d0dfe3 clang::FrontendAction::Execute()
/work/sources/llvm/current/tools/clang/lib/Frontend/FrontendAction.cpp:472:0
#26 0x0000000003cb39a5
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/work/sources/llvm/current/tools/clang/lib/Frontend/CompilerInstance.cpp:951:0
#27 0x0000000003e3b18b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/work/sources/llvm/current/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:249:0
#28 0x0000000001868da7 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /work/sources/llvm/current/tools/clang/tools/driver/cc1_main.cpp:221:0
#29 0x000000000185eb5f ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef)
/work/sources/llvm/current/tools/clang/tools/driver/driver.cpp:299:0
#30 0x000000000185f6ee main
/work/sources/llvm/current/tools/clang/tools/driver/driver.cpp:380:0
#31 0x00007ff04b291401 __libc_start_main /usr/src/debug/glibc-2.24-33-
ge9e69e4/csu/../csu/libc-start.c:323:0
#32 0x000000000185c55a _start (/work/builds/llvm/current/native/bin/clang-
4.0+0x185c55a)
Stack dump:
0.  Program arguments: /work/builds/llvm/current/native/bin/clang-4.0 -cc1 -
triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-
name 20031023-4.c -mrelocation-model static -mthread-model posix -mdisable-fp-
elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-
init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -coverage-
notes-file /work/builds/llvm/current/native/tests/20031023-4.gcno -resource-dir
/work/builds/llvm/current/native/bin/../lib/clang/5.0.0 -internal-isystem
/usr/local/include -internal-isystem
/work/builds/llvm/current/native/bin/../lib/clang/5.0.0/include -internal-
externc-isystem /include -internal-externc-isystem /usr/include -O0 -w -fdebug-
compilation-dir /work/builds/llvm/current/native/tests -ferror-limit 19 -
fmessage-length 130 -fobjc-runtime=gcc -fdiagnostics-show-option -o 20031023-
4.o -x c /work/sources/gcc/current/gcc/testsuite/gcc.c-torture/compile/20031023-
4.c
1.  <eof> parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module
'/work/sources/gcc/current/gcc/testsuite/gcc.c-torture/compile/20031023-4.c'.
4.  Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on function
'@baz'
Quuxplusone commented 7 years ago

Attached 20031023-4-a555f4.c (65448 bytes, text/x-csrc): Preprocessed test case.

Quuxplusone commented 7 years ago

Attached 20031023-4-a555f4.sh (1896 bytes, application/x-shellscript): Driver script for the test case