Closed Bug 1841201 Opened 1 year ago Closed 1 year ago

[mips] fatal error: error in backend: failed to perform tail call elimination on a call site marked musttail

Categories

(Toolkit :: General, defect)

defect

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- fixed
firefox114 --- wontfix
firefox115 --- wontfix
firefox116 --- wontfix
firefox117 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

When targetting mips with clang, the build fails with:

fatal error: error in backend: failed to perform tail call elimination on a call site marked musttail
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/glandium/.mozbuild/clang/bin/clang++ --sysroot /home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64 --target=mips64el-linux-gnuabi64 -o generated_message_tctable_lite.o -c -I/tmp/gecko/obj-mips64el-unknown-linux-gnuabi64/dist/stl_wrappers -I/tmp/gecko/obj-mips64el-unknown-linux-gnuabi64/dist/system_wrappers -include /tmp/gecko/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DHAVE_ZLIB -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/tmp/gecko/toolkit/components/protobuf -I/tmp/gecko/obj-mips64el-unknown-linux-gnuabi64/toolkit/components/protobuf -I/tmp/gecko/obj-mips64el-unknown-linux-gnuabi64/dist/include -I/tmp/gecko/obj-mips64el-unknown-linux-gnuabi64/dist/include/nspr -I/tmp/gecko/obj-mips64el-unknown-linux-gnuabi64/dist/include/nss -DMOZILLA_CLIENT -include /tmp/gecko/obj-mips64el-unknown-linux-gnuabi64/mozilla-config.h -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fPIC -fno-rtti -fno-exceptions -fno-math-errno -pipe -O2 -fno-omit-frame-pointer -funwind-tables -Wall -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wenum-compare-conditional -Wenum-float-conversion -Wno-error=deprecated -Wno-error=deprecated-anon-enum-enum-conversion -Wno-error=deprecated-enum-enum-conversion -Wno-error=deprecated-pragma -Wno-error=deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wformat -Wformat-security -Wno-psabi -Wthread-safety -Wno-error=builtin-macro-redefined -Wno-unknown-warning-option -Wno-ignored-qualifiers -Wno-maybe-uninitialized -Wno-return-type -Wno-sign-compare -Wno-subobject-linkage -Wno-unused-function -Wno-comma -Wno-null-conversion -Wno-unused-local-typedef -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/gtk-3.0 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/pango-1.0 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/glib-2.0 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/lib/mips64el-linux-gnuabi64/glib-2.0/include -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/fribidi -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/cairo -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/pixman-1 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/freetype2 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/libpng16 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/uuid -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/harfbuzz -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/gdk-pixbuf-2.0 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/libmount -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/blkid -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/gio-unix-2.0 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/libdrm -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/atk-1.0 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/at-spi2-atk/2.0 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/at-spi-2.0 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/dbus-1.0 -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/lib/mips64el-linux-gnuabi64/dbus-1.0/include -I/home/glandium/.mozbuild/sysroot-mips64el-linux-gnuabi64/usr/include/gtk-3.0/unix-print -pthread -fno-strict-aliasing -ffp-contract=off -MD -MP -MF .deps/generated_message_tctable_lite.o.pp /tmp/gecko/toolkit/components/protobuf/src/google/protobuf/generated_message_tctable_lite.cc
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module '/tmp/gecko/toolkit/components/protobuf/src/google/protobuf/generated_message_tctable_lite.cc'.
4.	Running pass 'MIPS DAG->DAG Pattern Instruction Selection' on function '@_ZN6google8protobuf8internal8TcParser9MiniParseEPNS0_11MessageLiteEPKcPNS1_12ParseContextEPKNS1_16TcParseTableBaseEmNS1_11TcFieldDataE'
 #0 0x00007fcdb27f6f07 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x41f6f07)
 #1 0x00007fcdb27f6a73 llvm::sys::CleanupOnSignal(unsigned long) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x41f6a73)
 #2 0x00007fcdb277ac2e (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) CrashRecoveryContext.cpp:0:0
 #3 0x00007fcdb277abeb (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x417abeb)
 #4 0x00007fcdb27f3e17 llvm::sys::Process::Exit(int, bool) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x41f3e17)
 #5 0x00005577b49d25b9 (/home/glandium/.mozbuild/clang/bin/clang+++0x165b9)
 #6 0x00007fcdb2783c77 llvm::report_fatal_error(llvm::Twine const&, bool) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x4183c77)
 #7 0x00007fcdb1c83725 (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x3683725)
 #8 0x00007fcdb447ff38 llvm::MipsTargetLowering::LowerCall(llvm::TargetLowering::CallLoweringInfo&, llvm::SmallVectorImpl<llvm::SDValue>&) const MipsISelLowering.cpp:0:0
 #9 0x00007fcdb219bacc llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x3b9bacc)
#10 0x00007fcdb1bc68de llvm::SelectionDAGBuilder::LowerCallTo(llvm::CallBase const&, llvm::SDValue, bool, bool, llvm::BasicBlock const*) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x35c68de)
#11 0x00007fcdb1baa5d9 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x35aa5d9)
#12 0x00007fcdb1ba0c98 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x35a0c98)
#13 0x00007fcdb1ba0603 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/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x35a0603)
#14 0x00007fcdb22976d1 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x3c976d1)
#15 0x00007fcdb2294a10 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x3c94a10)
#16 0x00007fcdb44a5ae7 llvm::MipsSEDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) MipsSEISelDAGToDAG.cpp:0:0
#17 0x00007fcdb2a0678b llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x440678b)
#18 0x00007fcdb22c4914 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x3cc4914)
#19 0x00007fcdb22c459f llvm::FPPassManager::runOnModule(llvm::Module&) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x3cc459f)
#20 0x00007fcdb25d45ef llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x3fd45ef)
#21 0x00007fcdb775f276 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (/home/glandium/.mozbuild/clang/bin/../lib/libclang-cpp.so.16+0x235f276)
#22 0x00007fcdb7a40e02 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) CodeGenAction.cpp:0:0
#23 0x00007fcdb6c895d0 clang::ParseAST(clang::Sema&, bool, bool) (/home/glandium/.mozbuild/clang/bin/../lib/libclang-cpp.so.16+0x18895d0)
#24 0x00007fcdb6ca085c clang::FrontendAction::Execute() (/home/glandium/.mozbuild/clang/bin/../lib/libclang-cpp.so.16+0x18a085c)
#25 0x00007fcdb6ca03a1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/glandium/.mozbuild/clang/bin/../lib/libclang-cpp.so.16+0x18a03a1)
#26 0x00007fcdb809246d clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/glandium/.mozbuild/clang/bin/../lib/libclang-cpp.so.16+0x2c9246d)
#27 0x00005577b49d1a34 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/glandium/.mozbuild/clang/bin/clang+++0x15a34)
#28 0x00005577b49cf4fc ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#29 0x00007fcdb7cd7b92 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::$_0>(long) Job.cpp:0:0
#30 0x00007fcdb277abc7 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/glandium/.mozbuild/clang/bin/../lib/libLLVM-16.so+0x417abc7)
#31 0x00007fcdb6c886fc clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/home/glandium/.mozbuild/clang/bin/../lib/libclang-cpp.so.16+0x18886fc)
#32 0x00007fcdb6c5a2e4 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/home/glandium/.mozbuild/clang/bin/../lib/libclang-cpp.so.16+0x185a2e4)
#33 0x00007fcdb6c599e8 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/home/glandium/.mozbuild/clang/bin/../lib/libclang-cpp.so.16+0x18599e8)
#34 0x00005577b49cd511 clang_main(int, char**) (/home/glandium/.mozbuild/clang/bin/clang+++0x11511)
#35 0x00007fcdae44618a __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#36 0x00007fcdae446245 call_init ./csu/../csu/libc-start.c:128:20
#37 0x00007fcdae446245 __libc_start_main ./csu/../csu/libc-start.c:368:5
#38 0x00005577b49cebde _start (/home/glandium/.mozbuild/clang/bin/clang+++0x12bde)
clang-16: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 16.0.4 (taskcluster-NtEfUiTNRJmPLgGwqbWs9Q)
Target: mips64el-unknown-linux-gnuabi64
Thread model: posix
InstalledDir: /home/glandium/.mozbuild/clang/bin
clang-16: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-16: note: diagnostic msg: /tmp/generated_message_tctable_lite-cf81b5.cpp
clang-16: note: diagnostic msg: /tmp/generated_message_tctable_lite-cf81b5.sh
clang-16: note: diagnostic msg: 

********************

It's presumably the same kind of thing that makes this long list of exceptions: https://searchfox.org/mozilla-central/rev/3b707c8fd7e978eebf24279ee51ccf07895cfbcb/toolkit/components/protobuf/src/google/protobuf/port_def.inc#257-260

Keywords: regression
Regressed by: 1773604

Set release status flags based on info from the regressing bug 1773604

:RyanVM, since you are the author of the regressor, bug 1773604, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Severity: -- → S4
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/fc4e5f188193
Work around tail-call optimization not happening on mips*. r=markh
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch

I'm assuming we're going to want an ESR115 nomination for this?

Flags: needinfo?(mh+mozilla)

Comment on attachment 9342146 [details]
Bug 1841201 - Work around tail-call optimization not happening on mips*.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Build failure for mips linux.
  • User impact if declined: See above
  • Fix Landed on Version: 117
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): NPOTB
Flags: needinfo?(mh+mozilla)
Attachment #9342146 - Flags: approval-mozilla-esr115?

Comment on attachment 9342146 [details]
Bug 1841201 - Work around tail-call optimization not happening on mips*.

Approved for 115.1esr.

Attachment #9342146 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: