[llvm-bugs] [Bug 42129] New: llvm::MachineInstr *llvm::MachineRegisterInfo::getVRegDef(unsigned int) const: Assertion `(I.atEnd() || std::next(I) == def_instr_end()) && "getVRegDef assumes a single definition or no definition"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 4 20:26:07 PDT 2019


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

            Bug ID: 42129
           Summary: llvm::MachineInstr
                    *llvm::MachineRegisterInfo::getVRegDef(unsigned int)
                    const: Assertion `(I.atEnd() || std::next(I) ==
                    def_instr_end()) && "getVRegDef assumes a single
                    definition or no definition"' failed.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: phosek at chromium.org
                CC: llvm-bugs at lists.llvm.org

This has started manifesting in our build today, bisecting shows that it has
been introduced by r362446/D62695:

Stack dump:
0.      Program arguments: ./bin/clang++ -cc1 -triple aarch64-fuchsia -emit-obj
-mrelax-all --mrelax-relocations -disable-free -main-file-name
number_decimalquantity.cpp -mrelocation-model pic -pic-level 2 -mthread-model
posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu generic -target-feature +neon -target-abi aapcs
-fallow-half-arguments-and-returns -dwarf-column-info -debug-info-kind=limited
-dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file
/b/s/w/ir/k/out/arm64/arm64-shared/obj/third_party/icu/source/i18n/libicui18n.number_decimalquantity.gcno
-sys-header-deps -D U_I18N_IMPLEMENTATION -D
TOOLCHAIN_VERSION=oEsFSe99FkcDKVxZkAY0MKi6C-yYOan1m-QL45N33W8C -D
_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -D ZX_DEBUGLEVEL=2 -D HAVE_DLOPEN=0 -D
UCONFIG_ONLY_HTML_CONVERSION=1 -D U_CHARSET_IS_UTF8=1 -D
U_USING_ICU_NAMESPACE=0 -D U_ENABLE_DYLOAD=0 -D USE_CHROMIUM_ICU=1 -D
U_STATIC_IMPLEMENTATION -D ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -D
UCHAR_TYPE=uint16_t -O0 -Wall -Wextra -Wnewline-eof -Wno-unused-parameter
-Wno-unused-lambda-capture -Wno-user-defined-warnings -Werror
-Wno-error=deprecated-declarations -Wno-unused-function -Wno-parentheses
-Wno-unused-function -Wno-unused-variable -Wno-deprecated-declarations
-Wthread-safety -std=c++17 -fdeprecated-macro
-fdebug-prefix-map=/b/s/w/ir/k=../.. -ferror-limit 19 -fmessage-length 0
-fvisibility-inlines-hidden -fsanitize=safe-stack -stack-protector 2
-ftrivial-auto-var-init=pattern -fno-signed-char -fobjc-runtime=gcc -fno-common
-fdiagnostics-show-option -fcolor-diagnostics -faddrsig -x c++
number_decimalquantity-52fc7a.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'number_decimalquantity-52fc7a.cpp'.
4.      Running pass 'InstructionSelect' on function
'@_ZNK6icu_636number4impl15DecimalQuantity8toDoubleEv'
 #0 0x0000000006f46d27 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:494:11
 #1 0x0000000006f46e19 PrintStackTraceSignalHandler(void*)
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:558:1
 #2 0x0000000006f458fb llvm::sys::RunSignalHandlers()
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/Support/Signals.cpp:67:5
 #3 0x0000000006f47418 SignalHandler(int)
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:357:1
 #4 0x00007f1566ec70c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
 #5 0x00007f15661f2fcf raise (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
 #6 0x00007f15661f43fa abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
 #7 0x00007f15661ebe37 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37)
 #8 0x00007f15661ebee2 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2)
 #9 0x00000000061c88a1 llvm::MachineRegisterInfo::getVRegDef(unsigned int)
const
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/CodeGen/MachineRegisterInfo.cpp:405:13
#10 0x000000000467f154 (anonymous
namespace)::AArch64InstructionSelector::tryOptSelect(llvm::MachineInstr&) const
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp:2857:13
#11 0x000000000467280b (anonymous
namespace)::AArch64InstructionSelector::select(llvm::MachineInstr&,
llvm::CodeGenCoverage&) const
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp:1792:9
#12 0x0000000007f5a70d
llvm::InstructionSelect::runOnMachineFunction(llvm::MachineFunction&)
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp:129:11
#13 0x00000000061203df
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:8
#14 0x00000000065db94c llvm::FPPassManager::runOnFunction(llvm::Function&)
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:23
#15 0x00000000065dbdaf llvm::FPPassManager::runOnModule(llvm::Module&)
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
#16 0x00000000065dc531 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1752:23
#17 0x00000000065dc068 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1865:16
#18 0x00000000065dcac1 llvm::legacy::PassManager::run(llvm::Module&)
/usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1896:3
#19 0x0000000007279699 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::__2::unique_ptr<llvm::raw_pwrite_stream,
std::__2::default_delete<llvm::raw_pwrite_stream> >)
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:896:3
#20 0x0000000007275d7c clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::__2::unique_ptr<llvm::raw_pwrite_stream,
std::__2::default_delete<llvm::raw_pwrite_stream> >)
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1504:5
#21 0x0000000007cd342a
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:301:7
#22 0x0000000009b21b1e clang::ParseAST(clang::Sema&, bool, bool)
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/lib/Parse/ParseAST.cpp:178:12
#23 0x0000000007b46e62 clang::ASTFrontendAction::ExecuteAction()
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1037:1
#24 0x0000000007cd0a9c clang::CodeGenAction::ExecuteAction()
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1058:1
#25 0x0000000007b468a3 clang::FrontendAction::Execute()
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:938:7
#26 0x0000000007a7ce60
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:945:7
#27 0x0000000007cc14b6
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:285:8
#28 0x00000000044e32e3 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/tools/driver/cc1_main.cpp:225:13
#29 0x00000000044d645f ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef)
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/tools/driver/driver.cpp:309:5
#30 0x00000000044d5804 main
/usr/local/google/home/phosek/clang-llvm/llvm-project/clang/tools/driver/driver.cpp:381:5
#31 0x00007f15661e02b1 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x202b1)
#32 0x00000000044d502a _start (./bin/clang+++0x44d502a)
zsh: abort      ./bin/clang++ "-cc1" "-triple" "aarch64-fuchsia" "-emit-obj"
"-mrelax-all"

The reproducer is
https://storage.cloud.google.com/fuchsia-build/builds/8911529548911825632/number_decimalquantity-52fc7a.tar.gz

-- 
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/20190605/be0a20ed/attachment-0001.html>


More information about the llvm-bugs mailing list