[llvm-bugs] [Bug 46594] New: Alignment assertion failure in instcombine

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jul 5 22:34:26 PDT 2020


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

            Bug ID: 46594
           Summary: Alignment assertion failure in instcombine
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: tlively at google.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 23687
  --> https://bugs.llvm.org/attachment.cgi?id=23687&action=edit
preprocessed source

We started seeing an assertion failure in the Emscripten test suite after
https://reviews.llvm.org/rG87e2751cf07cc570200d8d356d7f35fee2807779 landed. The
stack trace is below and the reproducer script and preprocessed source are
attached.

clang-11:
/usr/local/google/home/tlively/code/llvm-project/llvm/include/llvm/Support/Alignment.h:138:
llvm::MaybeAlign::MaybeAlign(uint64_t): Assertion `(Value == 0 ||
llvm::isPowerOf2_64(Value)) && "Alignment is neither 0 nor a power of 2"'
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: bin/clang-11 -cc1 -triple wasm32-unknown-emscripten
-emit-obj -disable-free -main-file-name src.cpp -mrelocation-model static
-mframe-pointer=none -fno-rounding-math -mconstructor-aliases -target-cpu
generic -fvisibility hidden -dwarf-column-info -debugger-tuning=gdb -D
__EMSCRIPTEN_major__=1 -D __EMSCRIPTEN_minor__=39 -D __EMSCRIPTEN_tiny__=18 -D
_LIBCPP_ABI_VERSION=2 -D unix -D __unix -D __unix__ -D EMSCRIPTEN -Os
-Werror=implicit-function-declaration -Werror -Wno-dynamic-class-memaccess
-Wno-format -Wno-format-extra-args -Wno-format-security
-Wno-pointer-bool-conversion -Wno-unused-volatile-lvalue
-Wno-c++11-compat-deprecated-writable-strings -Wno-invalid-pp-token
-Wno-shift-negative-value -fdeprecated-macro -ferror-limit 19
-fgnuc-version=4.2.1 -fno-inline-functions -fcxx-exceptions -fignore-exceptions
-fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp
-nostdsysteminc
-isystem/usr/local/google/home/tlively/code/emscripten/system/include/libcxx
-isystem/usr/local/google/home/tlively/code/emscripten/system/lib/libcxxabi/include
-isystem/usr/local/google/home/tlively/code/emscripten/system/lib/libunwind/include
-isystem/usr/local/google/home/tlively/code/emscripten/system/include/compat
-isystem/usr/local/google/home/tlively/code/emscripten/system/include
-isystem/usr/local/google/home/tlively/code/emscripten/system/include/libc
-isystem/usr/local/google/home/tlively/code/emscripten/system/lib/libc/musl/arch/emscripten
-isystem/usr/local/google/home/tlively/code/emscripten/system/local/include
-isystem/usr/local/google/home/tlively/code/emscripten/system/include/SSE
-isystem/usr/local/google/home/tlively/code/emscripten/cache/wasm/include
-isystem/usr/local/google/home/tlively/code/emscripten/system/include/SDL
-mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj
-mllvm -disable-lsr -x c++ src-cb26e4.cpp
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Function Pass Manager' on module 'src-cb26e4.cpp'.
4.      Running pass 'Combine redundant instructions' on function '@main'
 #0 0x00007f636213c5b4 PrintStackTraceSignalHandler(void*)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libLLVMSupport.so.11git+0x19b5b4)
 #1 0x00007f636213a0ae llvm::sys::RunSignalHandlers()
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libLLVMSupport.so.11git+0x1990ae)
 #2 0x00007f636213c77c SignalHandler(int)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libLLVMSupport.so.11git+0x19b77c)
 #3 0x00007f6365811110 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14110)
 #4 0x00007f6361aed761 raise
/build/glibc-M65Gwz/glibc-2.30/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #5 0x00007f6361ad755b abort /build/glibc-M65Gwz/glibc-2.30/stdlib/abort.c:81:7
 #6 0x00007f6361ad742f get_sysdep_segment_value
/build/glibc-M65Gwz/glibc-2.30/intl/loadmsgcat.c:509:8
 #7 0x00007f6361ad742f _nl_load_domain
/build/glibc-M65Gwz/glibc-2.30/intl/loadmsgcat.c:970:34
 #8 0x00007f6361ae6092 (/lib/x86_64-linux-gnu/libc.so.6+0x34092)
 #9 0x00007f6363e3ca3c llvm::InstCombiner::visitCallBase(llvm::CallBase&)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libLLVMInstCombine.so.11git+0x82a3c)
#10 0x00007f6363e2cf95 llvm::InstCombiner::visitCallInst(llvm::CallInst&)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libLLVMInstCombine.so.11git+0x72f95)
#11 0x00007f6363de73a7 llvm::InstCombiner::run()
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libLLVMInstCombine.so.11git+0x2d3a7)
#12 0x00007f6363dea6a1 combineInstructionsOverFunction(llvm::Function&,
llvm::InstCombineWorklist&, llvm::AAResults*, llvm::AssumptionCache&,
llvm::TargetLibraryInfo&, llvm::DominatorTree&,
llvm::OptimizationRemarkEmitter&, llvm::BlockFrequencyInfo*,
llvm::ProfileSummaryInfo*, unsigned int, llvm::LoopInfo*)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libLLVMInstCombine.so.11git+0x306a1)
#13 0x00007f6363deb047
llvm::InstructionCombiningPass::runOnFunction(llvm::Function&)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libLLVMInstCombine.so.11git+0x31047)
#14 0x00007f63624ce72e llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libLLVMCore.so.11git+0x20772e)
#15 0x00007f63624ceab8 llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libLLVMCore.so.11git+0x207ab8)
#16 0x00007f63624cf10d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libLLVMCore.so.11git+0x20810d)
#17 0x00007f636515f2c5 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> >)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libclangCodeGen.so.11git+0xcb2c5)
#18 0x00007f636548b841
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libclangCodeGen.so.11git+0x3f7841)
#19 0x00007f635fe9a493 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/../lib/libclangParse.so.11git+0x36493)
#20 0x00007f6363cde2bb clang::FrontendAction::Execute()
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libclangFrontend.so.11git+0x10c2bb)
#21 0x00007f6363c6b264
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libclangFrontend.so.11git+0x99264)
#22 0x00007f63657f9803
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/google/home/tlively/code/llvm-local/bin/../lib/libclangFrontendTool.so.11git+0x4803)
#23 0x00000000004133e3 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (bin/clang-11+0x4133e3)
#24 0x00000000004117fb ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(bin/clang-11+0x4117fb)
#25 0x00000000004110db main (bin/clang-11+0x4110db)
#26 0x00007f6361ad8e0b __libc_start_main
/build/glibc-M65Gwz/glibc-2.30/csu/../csu/libc-start.c:342:3
#27 0x000000000040df9a _start (bin/clang-11+0x40df9a)

-- 
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/20200706/93216eea/attachment.html>


More information about the llvm-bugs mailing list