[llvm-bugs] [Bug 43081] New: clang v8 crash during optimization pass

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 21 18:59:22 PDT 2019


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

            Bug ID: 43081
           Summary: clang v8 crash during optimization pass
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ishikawa at yk.rim.or.jp
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

I am reporting  a crash bug of clang v8.

The following is printed by clang when it failed.
(I am attaching the requested two files in the following posts.)

Stack dump:
0.    Program arguments: /home/ishikawa/.mozbuild/clang/bin/clang-8 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name line64.c
-mrelocation-model pic -pic-level 2 -mthread-model posix
-mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info
-enable-split-dwarf -debug-info-kind=limited -dwarf-version=4
-debugger-tuning=gdb -ggnu-pubnames -split-dwarf-file line64.dwo
-momit-leaf-frame-pointer -v -ffunction-sections -fdata-sections
-coverage-notes-file
/KERNEL-SRC/moz-obj-dir/objdir-tb3/comm/ldap/c-sdk/libraries/libldif/line64.gcno
-resource-dir /home/ishikawa/.mozbuild/clang/lib/clang/8.0.0 -include
/KERNEL-SRC/moz-obj-dir/objdir-tb3/mozilla-config.h -D DEBUG=1 -D
LINUX=1 -D LINUX2_0 -D linux=1 -D _PR_PTHREADS -D NET_SSL -D NS_DOMESTIC
-D LDAP_DEBUG -D USE_WAITPID -D NEEDPROTOS -I
/NREF-COMM-CENTRAL/mozilla/comm/ldap/c-sdk/libraries/libldif -I
/KERNEL-SRC/moz-obj-dir/objdir-tb3/comm/ldap/c-sdk/libraries/libldif -I
/NREF-COMM-CENTRAL/mozilla/comm/ldap/c-sdk/include -I
/KERNEL-SRC/moz-obj-dir/objdir-tb3/dist/include -I
/KERNEL-SRC/moz-obj-dir/objdir-tb3/dist/include/nspr -I
/KERNEL-SRC/moz-obj-dir/objdir-tb3/dist/include/nss -D MOZILLA_CLIENT -U
_FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -D fdatasync=fdatasync -D
DEBUG_4GB_CHECK -D USEHELGRIND=1 -D DEBUG -U _FORTIFY_SOURCE -D
_FORTIFY_SOURCE=2 -internal-isystem /usr/local/include -internal-isystem
/home/ishikawa/.mozbuild/clang/lib/clang/8.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem
/usr/include -Og -Werror=sign-compare -Werror=unused-result
-Werror=unused-variable -Werror=format -Wall -Wbitfield-enum-conversion
-Wempty-body -Wignored-qualifiers -Wpointer-arith
-Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits
-Wunreachable-code -Wunreachable-code-return -Wclass-varargs
-Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis
-Wstring-conversion -Wtautological-overlap-compare
-Wtautological-unsigned-enum-zero-compare
-Wtautological-unsigned-zero-compare -Wno-error=deprecated-declarations
-Wno-error=array-bounds -Wno-error=backend-plugin
-Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat
-Wformat-security -Wno-gnu-zero-variadic-macro-arguments -std=gnu99
-fdebug-compilation-dir
/KERNEL-SRC/moz-obj-dir/objdir-tb3/comm/ldap/c-sdk/libraries/libldif
-ferror-limit 19 -fmessage-length 0 -stack-protector 2
-fno-builtin-strlen -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -o line64.o -x c
/NREF-COMM-CENTRAL/mozilla/comm/ldap/c-sdk/libraries/libldif/line64.c
-faddrsig
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'Function Pass Manager' on module
'/NREF-COMM-CENTRAL/mozilla/comm/ldap/c-sdk/libraries/libldif/line64.c'.
4.    Running pass 'Combine redundant instructions' on function
'@ldif_base64_decode'
  #0 0x00007f9ac1292fe4 PrintStackTraceSignalHandler(void*)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0x62cfe4)
  #1 0x00007f9ac1290f0e llvm::sys::RunSignalHandlers()
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0x62af0e)
  #2 0x00007f9ac1293298 SignalHandler(int)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0x62d298)
  #3 0x00007f9ac37ac730 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
  #4 0x00007f9ac12e7244
llvm::GetElementPtrInst::getGEPReturnType(llvm::Type*, llvm::Value*,
llvm::ArrayRef<llvm::Value*>)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0x681244)
  #5 0x00007f9ac1300e0c llvm::GetElementPtrInst::Create(llvm::Type*,
llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&,
llvm::Instruction*)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0x69ae0c)
  #6 0x00007f9ac1aa9f75
llvm::LibCallSimplifier::optimizeStrChr(llvm::CallInst*,
llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0xe43f75)
  #7 0x00007f9ac1ab2d7a
llvm::LibCallSimplifier::optimizeStringMemoryLibCall(llvm::CallInst*,
llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0xe4cd7a)
  #8 0x00007f9ac1ab3927
llvm::LibCallSimplifier::optimizeCall(llvm::CallInst*)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0xe4d927)
  #9 0x00007f9ac1b8a5a1
llvm::InstCombiner::tryOptimizeCall(llvm::CallInst*)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0xf245a1)
#10 0x00007f9ac1b87596 llvm::InstCombiner::visitCallSite(llvm::CallSite)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0xf21596)
#11 0x00007f9ac1b7b90f
llvm::InstCombiner::visitCallInst(llvm::CallInst&)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0xf1590f)
#12 0x00007f9ac1b563a6 llvm::InstCombiner::run()
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0xef03a6)
#13 0x00007f9ac1b57766 combineInstructionsOverFunction(llvm::Function&,
llvm::InstCombineWorklist&, llvm::AAResults*, llvm::AssumptionCache&,
llvm::TargetLibraryInfo&, llvm::DominatorTree&,
llvm::OptimizationRemarkEmitter&, bool, llvm::LoopInfo*)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0xef1766)
#14 0x00007f9ac1b57b1f
llvm::InstructionCombiningPass::runOnFunction(llvm::Function&)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0xef1b1f)
#15 0x00007f9ac139149a
llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0x72b49a)
#16 0x00007f9ac1391823 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0x72b823)
#17 0x00007f9ac1391d9f llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/ishikawa/.mozbuild/clang/bin/../lib/libLLVM-8.so+0x72bd9f)
#18 0x000000000063818e
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/ishikawa/.mozbuild/clang/bin/clang-8+0x63818e)
#19 0x0000000000c85971
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/ishikawa/.mozbuild/clang/bin/clang-8+0xc85971)
#20 0x000000000118dd73 clang::ParseAST(clang::Sema&, bool, bool)
(/home/ishikawa/.mozbuild/clang/bin/clang-8+0x118dd73)
#21 0x0000000000aabb57 clang::FrontendAction::Execute()
(/home/ishikawa/.mozbuild/clang/bin/clang-8+0xaabb57)
#22 0x0000000000a529b8
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/ishikawa/.mozbuild/clang/bin/clang-8+0xa529b8)
#23 0x0000000000b3b016
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/ishikawa/.mozbuild/clang/bin/clang-8+0xb3b016)
#24 0x00000000005fc45d cc1_main(llvm::ArrayRef<char const*>, char
const*, void*) (/home/ishikawa/.mozbuild/clang/bin/clang-8+0x5fc45d)
#25 0x00000000005fa9e2 main
(/home/ishikawa/.mozbuild/clang/bin/clang-8+0x5fa9e2)
#26 0x00007f9ac07a509b __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2409b)
#27 0x00000000005f7ecd _start
(/home/ishikawa/.mozbuild/clang/bin/clang-8+0x5f7ecd)
clang-8: error: unable to execute command: Segmentation fault
clang-8: error: clang frontend command failed due to signal (use -v to
see invocation)
clang version 8.0.0 (tags/RELEASE_800/final)
(llvm/tags/RELEASE_800/final 356365)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/ishikawa/.mozbuild/clang/bin
clang-8: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed
source, and associated run script.
clang-8: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-8: note: diagnostic msg: /COMM-CENTRAL/TMP-DIR/line64-f13224.c
clang-8: note: diagnostic msg: /COMM-CENTRAL/TMP-DIR/line64-f13224.sh
clang-8: note: diagnostic msg:
********************

-- 
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/20190822/48224b67/attachment.html>


More information about the llvm-bugs mailing list