[LLVMbugs] [Bug 23678] New: crash in optimizer

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 27 12:09:39 PDT 2015


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

            Bug ID: 23678
           Summary: crash in optimizer
           Product: clang
           Version: 3.6
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mark at artillery.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Just found a crash in clang that seems to be in the optimizer. The crash
reproduces at -O2 and -O3, but not at -O1. It also reproduces if the opt tool
is run on a .bc file emitted by the compiler without optimizations.

Here's the trace:

0  clang                    0x00000001058e8bf9 void
std::__1::seed_seq::generate<unsigned int*>(unsigned int*, unsigned int*) +
10777
1  clang                    0x00000001058e935b void
std::__1::seed_seq::generate<unsigned int*>(unsigned int*, unsigned int*) +
12667
2  libsystem_platform.dylib 0x00007fff869dff1a _sigtramp + 26
3  libsystem_platform.dylib 0x0000000106271a00 _sigtramp + 2139691776
4  clang                    0x0000000104ad6d8d
llvm::SmallVectorTemplateBase<std::__1::unique_ptr<llvm::GlobalVariable,
std::__1::default_delete<llvm::GlobalVariable> >, false>::grow(unsigned long) +
12909
5  clang                    0x00000001055c98b8
std::__1::__tree<std::__1::__value_type<llvm::Function const*,
llvm::CallGraphNode*>, std::__1::__map_value_compare<llvm::Function const*,
std::__1::__value_type<llvm::Function const*, llvm::CallGraphNode*>,
std::__1::less<llvm::Function const*>, true>,
std::__1::allocator<std::__1::__value_type<llvm::Function const*,
llvm::CallGraphNode*> >
>::destroy(std::__1::__tree_node<std::__1::__value_type<llvm::Function const*,
llvm::CallGraphNode*>, void*>*) + 2728
6  clang                    0x00000001058798e8 void
llvm::DeleteContainerSeconds<llvm::DenseMap<llvm::Type*, llvm::UndefValue*,
llvm::DenseMapInfo<llvm::Type*>, llvm::detail::DenseMapPair<llvm::Type*,
llvm::UndefValue*> > >(llvm::DenseMap<llvm::Type*, llvm::UndefValue*,
llvm::DenseMapInfo<llvm::Type*>, llvm::detail::DenseMapPair<llvm::Type*,
llvm::UndefValue*> >&) + 32296
7  clang                    0x0000000103c8ceaa void
std::__1::vector<clang::serialization::ModuleFile*,
std::__1::allocator<clang::serialization::ModuleFile*>
>::__push_back_slow_path<clang::serialization::ModuleFile*
const&>(clang::serialization::ModuleFile* const&&&) + 9450
8  clang                    0x0000000103d8ebf2
llvm::SmallVectorTemplateBase<llvm::DenseMap<clang::BaseSubobject, unsigned
long long, llvm::DenseMapInfo<clang::BaseSubobject>,
llvm::detail::DenseMapPair<clang::BaseSubobject, unsigned long long> >,
false>::grow(unsigned long) + 27570
9  clang                    0x0000000103e10dc4 void
std::__1::vector<clang::CodeGen::LValue,
std::__1::allocator<clang::CodeGen::LValue>
>::__push_back_slow_path<clang::CodeGen::LValue const&>(clang::CodeGen::LValue
const&&&) + 1236
10 clang                    0x0000000103ae247e
std::__1::__tree<std::__1::__value_type<clang::edit::FileOffset,
clang::edit::EditedSource::FileEdit>,
std::__1::__map_value_compare<clang::edit::FileOffset,
std::__1::__value_type<clang::edit::FileOffset,
clang::edit::EditedSource::FileEdit>, std::__1::less<clang::edit::FileOffset>,
true>, std::__1::allocator<std::__1::__value_type<clang::edit::FileOffset,
clang::edit::EditedSource::FileEdit> >
>::destroy(std::__1::__tree_node<std::__1::__value_type<clang::edit::FileOffset,
clang::edit::EditedSource::FileEdit>, void*>*) + 5630
11 clang                    0x0000000103ab4833 void
std::__1::vector<clang::FrontendInputFile,
std::__1::allocator<clang::FrontendInputFile>
>::__push_back_slow_path<clang::FrontendInputFile
const&>(clang::FrontendInputFile const&&&) + 20851
12 clang                    0x0000000103a777f6 void
std::__1::__tree_balance_after_insert<std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*,
std::__1::__tree_node_base<void*>*) + 4022
13 clang                    0x0000000103a6f029
14 clang                    0x0000000103a739d0 void
std::__1::vector<llvm::SourceMgr::SrcBuffer,
std::__1::allocator<llvm::SourceMgr::SrcBuffer>
>::__push_back_slow_path<llvm::SourceMgr::SrcBuffer>(llvm::SourceMgr::SrcBuffer&&)
+ 2048
15 libdyld.dylib            0x00007fff8b0b05c9 start + 1
Stack dump:
0.    Program arguments: /Users/mlogan/toolchain/clang+llvm-3.6.0/bin/clang
-cc1 -triple x86_64-apple-macosx10.10.0 -emit-llvm-bc -disable-free
-disable-llvm-verifier -main-file-name native-bindings.cpp -mrelocation-model
pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 241.9
-dwarf-column-info -coverage-file
/Users/mlogan/artillery/projects/atlas/game/CPP/build-x86_64-apple-darwin/native-bindings.bc
-resource-dir /Users/mlogan/toolchain/clang+llvm-3.6.0/bin/../lib/clang/3.6.0
-I entity-lib/../third-party/glm -I entity-lib/../third-party/crc32 -I
build-x86_64-apple-darwin -I ../../../../local/include -I
../../../../native-client/deps/SDL2/include -I . -I Lib -I entity-lib -I
ThirdParty/box2d.js/Box2D_v2.2.1 -I ../../../../native-client/src -I
../../../../native-client/deps/io.js/deps/v8/include -stdlib=libc++ -O2
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/Users/mlogan/artillery/projects/atlas/game/CPP -ferror-limit 19
-fmessage-length 176 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.10.0 -fencode-extended-block-signature
-fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -o
build-x86_64-apple-darwin/native-bindings.bc -x c++
build-x86_64-apple-darwin/native-bindings.cpp
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module
'build-x86_64-apple-darwin/native-bindings.cpp'.
clang: error: unable to execute command: Floating point exception: 8
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.6.0 (tags/RELEASE_360/final)
Target: x86_64-apple-darwin14.1.0
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:
/var/folders/4j/95xx1xm16xn20mqgqv4jd_xc0000gn/T/native-bindings-2ac66c.cpp
clang: note: diagnostic msg:
/var/folders/4j/95xx1xm16xn20mqgqv4jd_xc0000gn/T/native-bindings-2ac66c.sh
clang: 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/20150527/e46051f5/attachment.html>


More information about the llvm-bugs mailing list