Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

clang scan-build abort: core dumped #22595

Closed Quuxplusone closed 9 years ago

Quuxplusone commented 9 years ago
Bugzilla Link PR22596
Status RESOLVED FIXED
Importance P normal
Reported by John Smith (lbalbalba@gmail.com)
Reported on 2015-02-15 06:46:13 -0800
Last modified on 2015-02-17 11:18:54 -0800
Version trunk
Hardware PC Linux
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments abort.crash.tar.gz (229605 bytes, application/gzip)
Blocks
Blocked by
See also
Created attachment 13868
script to reproduce abort and core dump

clang scan-build aborts and dumps core analyzing libreoffice codebase. See
attachment ('hb-ot-layout-13fa42.sh') to reproduce the issue.
Quuxplusone commented 9 years ago

Attached abort.crash.tar.gz (229605 bytes, application/gzip): script to reproduce abort and core dump

Quuxplusone commented 9 years ago
Here's the backtrace:

                                 ^
In file included from hb-ot-layout.cc:31:
In file included from ./hb-ot-layout-private.hh:36:
In file included from ./hb-font-private.hh:35:
./hb-object-private.hh:156:20: warning: 'this' pointer cannot be null in well-
defined C++ code; pointer may be assumed to always convert to true [-Wundefined-
bool-conversion]
    if (unlikely (!this || this->is_inert ()))
                  ~^~~~
./hb-private.hh:152:60: note: expanded from macro 'unlikely'
#define unlikely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 0))
                                                           ^
./hb-private.hh:150:34: note: expanded from macro '_HB_BOOLEAN_EXPR'
#define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0)
                                 ^
In file included from hb-ot-layout.cc:31:
In file included from ./hb-ot-layout-private.hh:36:
In file included from ./hb-font-private.hh:36:
./hb-face-private.hh:70:20: warning: 'this' pointer cannot be null in well-
defined C++ code; pointer may be assumed to always convert to true [-Wundefined-
bool-conversion]
    if (unlikely (!this || !reference_table_func))
                  ~^~~~
./hb-private.hh:152:60: note: expanded from macro 'unlikely'
#define unlikely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 0))
                                                           ^
./hb-private.hh:150:34: note: expanded from macro '_HB_BOOLEAN_EXPR'
#define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0)
                                 ^
clang: /home/buildslave/source/llvm/llvm/include/llvm/ADT/ilist.h:215:
llvm::ilist_iterator<NodeTy>& llvm::ilist_iterator<NodeTy>::operator--() [with
NodeTy = llvm::Instruction]: Assertion `NodePtr && "--'d off the beginning of
an ilist!"' failed.
#0 0x2a7da82 llvm::sys::PrintStackTrace(_IO_FILE*)
(/home/buildslave/opt/bin/clang+0x2a7da82)
#1 0x2a7bd79 (/home/buildslave/opt/bin/clang+0x2a7bd79)
#2 0x2b6aefcf20d0 __restore_rt (/lib64/libpthread.so.0+0x100d0)
#3 0x2b6af09648c7 __GI_raise (/lib64/libc.so.6+0x348c7)
#4 0x2b6af096652a __GI_abort (/lib64/libc.so.6+0x3652a)
#5 0x2b6af095d46d __assert_fail_base (/lib64/libc.so.6+0x2d46d)
#6 0x2b6af095d522 (/lib64/libc.so.6+0x2d522)
#7 0x279cd23 (/home/buildslave/opt/bin/clang+0x279cd23)
#8 0x279e5d7
llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(llvm::AliasAnalysis::Location
const&, bool, llvm::ilist_iterator<llvm::Instruction>, llvm::BasicBlock*,
llvm::Instruction*) (/home/buildslave/opt/bin/clang+0x279e5d7)
#9 0x27a2fec
llvm::MemoryDependenceAnalysis::GetNonLocalInfoForBlock(llvm::Instruction*,
llvm::AliasAnalysis::Location const&, bool, llvm::BasicBlock*,
std::vector<llvm::NonLocalDepEntry, std::allocator<llvm::NonLocalDepEntry> >*,
unsigned int) (/home/buildslave/opt/bin/clang+0x27a2fec)
#10 0x27a5ccf
llvm::MemoryDependenceAnalysis::getNonLocalPointerDepFromBB(llvm::Instruction*,
llvm::PHITransAddr const&, llvm::AliasAnalysis::Location const&, bool,
llvm::BasicBlock*, llvm::SmallVectorImpl<llvm::NonLocalDepResult>&,
llvm::DenseMap<llvm::BasicBlock*, llvm::Value*,
llvm::DenseMapInfo<llvm::BasicBlock*>,
llvm::detail::DenseMapPair<llvm::BasicBlock*, llvm::Value*> >&, bool)
(/home/buildslave/opt/bin/clang+0x27a5ccf)
#11 0x27a6598
llvm::MemoryDependenceAnalysis::getNonLocalPointerDependency(llvm::Instruction*,
llvm::SmallVectorImpl<llvm::NonLocalDepResult>&)
(/home/buildslave/opt/bin/clang+0x27a6598)
#12 0x24fe779 (/home/buildslave/opt/bin/clang+0x24fe779)
#13 0x250192e (/home/buildslave/opt/bin/clang+0x250192e)
#14 0x29fe928 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/buildslave/opt/bin/clang+0x29fe928)
#15 0x26dab7f (/home/buildslave/opt/bin/clang+0x26dab7f)
#16 0x29ff0a8 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/buildslave/opt/bin/clang+0x29ff0a8)
#17 0xbe2109 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::StringRef, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) (/home/buildslave/opt/bin/clang+0xbe2109)
#18 0xbd1377 (/home/buildslave/opt/bin/clang+0xbd1377)
#19 0xd8bbe5 clang::ParseAST(clang::Sema&, bool, bool)
(/home/buildslave/opt/bin/clang+0xd8bbe5)
#20 0xbd1fbb clang::CodeGenAction::ExecuteAction()
(/home/buildslave/opt/bin/clang+0xbd1fbb)
#21 0xa21f96 clang::FrontendAction::Execute()
(/home/buildslave/opt/bin/clang+0xa21f96)
#22 0x9fd0d9 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/buildslave/opt/bin/clang+0x9fd0d9)
#23 0x9e56e3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/buildslave/opt/bin/clang+0x9e56e3)
#24 0x9dd508 cc1_main(llvm::ArrayRef<char const*>, char const*, void*)
(/home/buildslave/opt/bin/clang+0x9dd508)
#25 0x9b5a19 main (/home/buildslave/opt/bin/clang+0x9b5a19)
#26 0x2b6af094ffe0 __libc_start_main (/lib64/libc.so.6+0x1ffe0)
#27 0x9dc90d _start (/home/buildslave/opt/bin/clang+0x9dc90d)
Stack dump:
0.      Program arguments: /home/buildslave/opt/bin/clang -cc1 -triple x86_64-
unknown-linux-gnu -emit-obj -disable-free -main-file-name hb-ot-layout.cc -
mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-
verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-
64 -target-linker-version 2.24 -momit-leaf-frame-pointer -g -dwarf-column-info -
coverage-file /home/buildslave/source/libo-
core/workdir/UnpackedTarball/harfbuzz/src/libharfbuzz_la-hb-ot-layout.o -
resource-dir /home/buildslave/opt/bin/../lib/clang/3.7.0 -dependency-file
.deps/libharfbuzz_la-hb-ot-layout.Tpo -sys-header-deps -MP -MT libharfbuzz_la-
hb-ot-layout.lo -D HAVE_CONFIG_H -D PIC -I . -I .. -I ./hb-ucdn -internal-
isystem /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2 -
internal-isystem /usr/lib/gcc/x86_64-redhat-
linux/4.9.2/../../../../include/c++/4.9.2/x86_64-redhat-linux -internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/backward -
internal-isystem /usr/local/include -internal-isystem
/home/buildslave/opt/bin/../lib/clang/3.7.0/include -internal-externc-isystem
/include -internal-externc-isystem /usr/include -O2 -Wcast-align --std=c++0x -
fdeprecated-macro -fdebug-compilation-dir /home/buildslave/source/libo-
core/workdir/UnpackedTarball/harfbuzz/src -ferror-limit 19 -fmessage-length 0 -
fvisibility-inlines-hidden -pthread -mstackrealign -fno-rtti -fobjc-runtime=gcc
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o libharfbuzz_la-hb-
ot-layout.o -x c++ hb-ot-layout.cc
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module 'hb-ot-layout.cc'.
4.      Running pass 'Global Value Numbering' on function
'@_ZNK2OT18SingleSubstFormat114collect_glyphsEPNS_27hb_collect_glyphs_context_tE'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (trunk 229265)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/hb-ot-layout-13fa42.cpp
clang: note: diagnostic msg: /tmp/hb-ot-layout-13fa42.sh
clang: note: diagnostic msg:

********************
Makefile:1101: recipe for target 'libharfbuzz_la-hb-ot-layout.lo' failed
make[4]: *** [libharfbuzz_la-hb-ot-layout.lo] Error 1
Makefile:1399: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
Makefile:748: recipe for target 'all' failed
make[2]: *** [all] Error 2
/home/buildslave/source/libo-
core/external/harfbuzz/ExternalProject_harfbuzz.mk:23: recipe for target
'/home/buildslave/source/libo-core/workdir/ExternalProject/harfbuzz/build'
failed
make[1]: *** [/home/buildslave/source/libo-
core/workdir/ExternalProject/harfbuzz/build] Error 1
Makefile:243: recipe for target 'build' failed
make: *** [build] Error 2
scan-build: 823 bugs found.
scan-build: Run 'scan-view /home/buildslave/tmp/libreoffice/2015-02-15-125449-
2523-1' to examine bug reports.
scan-build: The analyzer encountered problems on some source files.
scan-build: Preprocessed versions of these sources were deposited in
'/home/buildslave/tmp/libreoffice/2015-02-15-125449-2523-1/failures'.
scan-build: Please consider submitting a bug report using these files:
scan-build:   http://clang-analyzer.llvm.org/filing_bugs.html
Quuxplusone commented 9 years ago

I can no longer reproduce this with svn revision: 229489. closing.