[llvm-bugs] [Bug 47630] New: regression with mips-linux: Assertion `ShiftAmt <= BitWidth && "Invalid shift amount"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 23 16:10:42 PDT 2020


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

            Bug ID: 47630
           Summary: regression with mips-linux: Assertion `ShiftAmt <=
                    BitWidth && "Invalid shift amount"' failed
           Product: new-bugs
           Version: 11.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: andrew at ziglang.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

LLVM 10 debug build (assertions enabled): 

[nix-shell:~/Downloads/zig/build-llvm10-debug]$ ./zig test ../lib/std/std.zig
-target mips-linux-none --test-cmd qemu-mips --test-cmd-bin 

(ok)

LLVM 11 rc3 debug build (assertions enabled):


[nix-shell:~/tmp/zig/build-llvm11-debug]$ ./zig test ../lib/std/std.zig -target
mips-linux-none --test-cmd qemu-mips --test-cmd-bin 

LLVM Emit Output... zig: ../include/llvm/ADT/APInt.h:997: void
llvm::APInt::lshrInPlace(unsigned int): Assertion `ShiftAmt <= BitWidth &&
"Invalid shift amount"' failed.


To reproduce (see following comment for test.ll):

~/local/llvm11-debug/bin/clang-11 -target mips-unknown-linux-unknown test.ll -c
clang-11: ../include/llvm/ADT/APInt.h:997: void
llvm::APInt::lshrInPlace(unsigned int): Assertion `ShiftAmt <= BitWidth &&
"Invalid shift amount"' failed.
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: /home/andy/local/llvm11-debug/bin/clang-11 -target
mips-unknown-linux-unknown test.ll -c 
1.      Code generation
 #0 0x0000000004433298 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/Support/Unix/Signals.inc:564:22
 #1 0x000000000443332b PrintStackTraceSignalHandler(void*)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/Support/Unix/Signals.inc:625:1
 #2 0x00000000044313dc llvm::sys::RunSignalHandlers()
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/Support/Signals.cpp:68:20
 #3 0x0000000004432bd1 llvm::sys::CleanupOnSignal(unsigned long)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/Support/Unix/Signals.inc:361:31
 #4 0x0000000004340f68 (anonymous
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/Support/CrashRecoveryContext.cpp:77:5
 #5 0x00000000043413c5 CrashRecoverySignalHandler(int)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/Support/CrashRecoveryContext.cpp:383:1
 #6 0x00007f6fb160af70 __restore_rt
(/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libpthread.so.0+0x12f70)
 #7 0x00007f6fb110915a raise
(/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libc.so.6+0x3815a)
 #8 0x00007f6fb10f3548 abort
(/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libc.so.6+0x22548)
 #9 0x00007f6fb10f342f _nl_load_domain.cold.0
(/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libc.so.6+0x2242f)
#10 0x00007f6fb1101ad2
(/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libc.so.6+0x30ad2)
#11 0x0000000001ae9880 llvm::APInt::lshrInPlace(unsigned int)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../include/llvm/ADT/APInt.h:998:21
#12 0x000000000500487b emitGlobalConstantLargeInt(llvm::ConstantInt const*,
llvm::AsmPrinter&)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/CodeGen/AsmPrinter/AsmPrinter.cpp:2647:28
#13 0x0000000005004fed emitGlobalConstantImpl(llvm::DataLayout const&,
llvm::Constant const*, llvm::AsmPrinter&, llvm::Constant const*, unsigned long)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/CodeGen/AsmPrinter/AsmPrinter.cpp:2792:5
#14 0x00000000050053b4 llvm::AsmPrinter::emitGlobalConstant(llvm::DataLayout
const&, llvm::Constant const*)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/CodeGen/AsmPrinter/AsmPrinter.cpp:2857:1
#15 0x0000000004ffa602
llvm::AsmPrinter::emitGlobalVariable(llvm::GlobalVariable const*)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/CodeGen/AsmPrinter/AsmPrinter.cpp:647:7
#16 0x0000000004ffef55 llvm::AsmPrinter::doFinalization(llvm::Module&)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1488:34
#17 0x0000000003a86a9f llvm::FPPassManager::doFinalization(llvm::Module&)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/IR/LegacyPassManager.cpp:1570:13
#18 0x0000000003a87015 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/IR/LegacyPassManager.cpp:1646:13
#19 0x0000000003a823d0 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/IR/LegacyPassManager.cpp:614:13
#20 0x0000000003a875bf llvm::legacy::PassManager::run(llvm::Module&)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/IR/LegacyPassManager.cpp:1738:1
#21 0x00000000046f824c 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/andy/local/llvm11-debug/bin/clang-11+0x46f824c)
#22 0x0000000005480593 clang::CodeGenAction::ExecuteAction()
(/home/andy/local/llvm11-debug/bin/clang-11+0x5480593)
#23 0x0000000004cf9949 clang::FrontendAction::Execute()
(/home/andy/local/llvm11-debug/bin/clang-11+0x4cf9949)
#24 0x0000000004cb1c7e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/andy/local/llvm11-debug/bin/clang-11+0x4cb1c7e)
#25 0x0000000004dc9cf0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/andy/local/llvm11-debug/bin/clang-11+0x4dc9cf0)
#26 0x00000000019dc824 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/andy/local/llvm11-debug/bin/clang-11+0x19dc824)
#27 0x00000000019d9a68 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/andy/local/llvm11-debug/bin/clang-11+0x19d9a68)
#28 0x0000000004b782e5 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const::'lambda'()>(long)
(/home/andy/local/llvm11-debug/bin/clang-11+0x4b782e5)
#29 0x00000000043356ca llvm::function_ref<void ()>::operator()() const
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../include/llvm/ADT/STLExtras.h:203:62
#30 0x0000000004341582
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
/home/andy/Downloads/llvm-project-11/llvm/build-debug/../lib/Support/CrashRecoveryContext.cpp:419:10
#31 0x0000000004b78bf3
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const (.part.0)
(/home/andy/local/llvm11-debug/bin/clang-11+0x4b78bf3)
#32 0x0000000004b51915
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/home/andy/local/llvm11-debug/bin/clang-11+0x4b51915)
#33 0x0000000004b52219
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/home/andy/local/llvm11-debug/bin/clang-11+0x4b52219)
#34 0x0000000004b5aea1
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/home/andy/local/llvm11-debug/bin/clang-11+0x4b5aea1)
#35 0x00000000019d05f8 main
(/home/andy/local/llvm11-debug/bin/clang-11+0x19d05f8)
#36 0x00007f6fb10f4d8b __libc_start_main
(/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libc.so.6+0x23d8b)
#37 0x00000000019d95fa _start
/build/glibc-2.30/csu/../sysdeps/x86_64/start.S:122:0
clang-11: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 11.0.0 (git://github.com/llvm/llvm-project
0b56e5490dc33e4e7a4fdd837e642f72a2659189)
Target: mips-unknown-linux-unknown
Thread model: posix
InstalledDir: /home/andy/local/llvm11-debug/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/20200923/3440ff48/attachment-0001.html>


More information about the llvm-bugs mailing list