<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Crash when compiling inlined function via Android NDK Clang 3.3"
href="http://llvm.org/bugs/show_bug.cgi?id=17174">17174</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash when compiling inlined function via Android NDK Clang 3.3
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alvion@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=11174" name="attach_11174" title="intermediate .cpp">attachment 11174</a> <a href="attachment.cgi?id=11174&action=edit" title="intermediate .cpp">[details]</a></span>
intermediate .cpp
Clang crashes while compiling a fairly innocuous function. This is ndk r9,
Clang 3.3.
Output:
Assertion failed: (begin() + idx < end()), function operator[], file
/Volumes/data/ndk-toolchain/src/llvm-3.3/llvm/include/llvm/ADT/SmallVector.h,
line 144.
0 clang++ 0x0000000102195305
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
629
1 clang++ 0x0000000102195e6e
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
3550
2 libsystem_c.dylib 0x00007fff8fbf1cfa _sigtramp + 26
3 libsystem_c.dylib 0x00007fff5fbf7a00 _sigtramp + 3489684768
4 clang++ 0x000000010219525e
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
462
5 clang++ 0x00000001021952a5
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
533
6 clang++ 0x000000010157a95d
std::vector<llvm::object::macho::RelocationEntry,
std::allocator<llvm::object::macho::RelocationEntry>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::object::macho::RelocationEntry*,</span >
std::vector<llvm::object::macho::RelocationEntry,
std::allocator<llvm::object::macho::RelocationEntry> > >,
llvm::object::macho::RelocationEntry const&) + 9917
7 clang++ 0x0000000101582e9a
std::vector<llvm::object::macho::RelocationEntry,
std::allocator<llvm::object::macho::RelocationEntry>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::object::macho::RelocationEntry*,</span >
std::vector<llvm::object::macho::RelocationEntry,
std::allocator<llvm::object::macho::RelocationEntry> > >,
llvm::object::macho::RelocationEntry const&) + 44026
8 clang++ 0x0000000101588002
std::vector<llvm::object::macho::RelocationEntry,
std::allocator<llvm::object::macho::RelocationEntry>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::object::macho::RelocationEntry*,</span >
std::vector<llvm::object::macho::RelocationEntry,
std::allocator<llvm::object::macho::RelocationEntry> > >,
llvm::object::macho::RelocationEntry const&) + 64866
9 clang++ 0x0000000101fda630 std::vector<llvm::MCSectionELF const*,
std::allocator<llvm::MCSectionELF const*>
<span class="quote">>::_M_fill_insert(__gnu_cxx::__normal_iterator<llvm::MCSectionELF const**,</span >
std::vector<llvm::MCSectionELF const*, std::allocator<llvm::MCSectionELF
const*> > >, unsigned long, llvm::MCSectionELF const* const&) + 41328
10 clang++ 0x00000001013c1c34 std::_Rb_tree<llvm::MachineInstr*,
std::pair<llvm::MachineInstr* const, unsigned int>,
std::_Select1st<std::pair<llvm::MachineInstr* const, unsigned int> >,
std::less<llvm::MachineInstr*>, std::allocator<std::pair<llvm::MachineInstr*
const, unsigned int> >
<span class="quote">>::_M_insert_unique(std::_Rb_tree_iterator<std::pair<llvm::MachineInstr* const,</span >
unsigned int> >, std::pair<llvm::MachineInstr* const, unsigned int> const&) +
48532
11 clang++ 0x0000000101997713
std::vector<llvm::TargetLowering::AsmOperandInfo,
std::allocator<llvm::TargetLowering::AsmOperandInfo>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::TargetLowering::AsmOperandInfo*,</span >
std::vector<llvm::TargetLowering::AsmOperandInfo,
std::allocator<llvm::TargetLowering::AsmOperandInfo> > >,
llvm::TargetLowering::AsmOperandInfo const&) + 40419
12 clang++ 0x00000001013b8054 std::_Rb_tree<llvm::MachineInstr*,
std::pair<llvm::MachineInstr* const, unsigned int>,
std::_Select1st<std::pair<llvm::MachineInstr* const, unsigned int> >,
std::less<llvm::MachineInstr*>, std::allocator<std::pair<llvm::MachineInstr*
const, unsigned int> >
<span class="quote">>::_M_insert_unique(std::_Rb_tree_iterator<std::pair<llvm::MachineInstr* const,</span >
unsigned int> >, std::pair<llvm::MachineInstr* const, unsigned int> const&) +
8628
13 clang++ 0x0000000101ad4f9e void
llvm::ViewGraph<llvm::MachineFunction const*>(llvm::MachineFunction const*
const&, llvm::Twine const&, bool, llvm::Twine const&, llvm::GraphProgram::Name)
+ 926
14 clang++ 0x0000000102113200
llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo
const*>::OptionInfo, false>::grow(unsigned long) + 47824
15 clang++ 0x000000010211329e
llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo
const*>::OptionInfo, false>::grow(unsigned long) + 47982
16 clang++ 0x0000000102112bdf
llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo
const*>::OptionInfo, false>::grow(unsigned long) + 46255
17 clang++ 0x0000000102112e40
llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo
const*>::OptionInfo, false>::grow(unsigned long) + 46864
18 clang++ 0x0000000102112f1d
llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::PassInfo
const*>::OptionInfo, false>::grow(unsigned long) + 47085
19 clang++ 0x000000010024f85a void
llvm::ViewGraph<clang::serialization::ModuleManager>(clang::serialization::ModuleManager
const&, llvm::Twine const&, bool, llvm::Twine const&, llvm::GraphProgram::Name)
+ 7578
20 clang++ 0x00000001003d7023 std::vector<clang::CXXRecordDecl
const*, std::allocator<clang::CXXRecordDecl const*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CXXRecordDecl const**,</span >
std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl
const*> > >, clang::CXXRecordDecl const* const&) + 18179
21 clang++ 0x0000000100447e74
clang::operator==(clang::specific_attr_iterator<clang::MSP430InterruptAttr,
llvm::SmallVector<clang::Attr*, 2u> >,
clang::specific_attr_iterator<clang::MSP430InterruptAttr,
llvm::SmallVector<clang::Attr*, 2u> >) + 676
22 clang++ 0x00000001003d4ced std::vector<clang::CXXRecordDecl
const*, std::allocator<clang::CXXRecordDecl const*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CXXRecordDecl const**,</span >
std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl
const*> > >, clang::CXXRecordDecl const* const&) + 9165
23 clang++ 0x0000000100092784
llvm::SmallVectorTemplateBase<clang::CharSourceRange, false>::grow(unsigned
long) + 6980
24 clang++ 0x0000000100062841 std::vector<clang::CompilerInstance*,
std::allocator<clang::CompilerInstance*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CompilerInstance**,</span >
std::vector<clang::CompilerInstance*, std::allocator<clang::CompilerInstance*>
<span class="quote">> >, clang::CompilerInstance* const&) + 24065</span >
25 clang++ 0x000000010000b079 std::_Rb_tree<std::string, std::string,
std::_Identity<std::string>, std::less<std::string>,
std::allocator<std::string> >::_M_erase(std::_Rb_tree_node<std::string>*) +
4761
26 clang++ 0x0000000100001098
27 clang++ 0x000000010000907c std::vector<std::string,
std::allocator<std::string> >::operator=(std::vector<std::string,
std::allocator<std::string> > const&) + 12828
28 clang++ 0x0000000100000c34
29 clang++ 0x0000000000000070
Stack dump:
0. Program arguments:
/libraries/android-ndk-r9/toolchains/llvm-3.3/prebuilt/darwin-x86_64/bin/clang++
-cc1 -triple armv7-none-linux-androideabi -S -disable-free -main-file-name
LocklessPoolAllocator.cpp -mrelocation-model pic -pic-level 1 -relaxed-aliasing
-fmath-errno -mconstructor-aliases -munwind-tables -fuse-init-array -target-abi
aapcs-linux -target-cpu cortex-a8 -mfloat-abi soft -target-feature
+soft-float-abi -target-feature +neon -backend-option -arm-enable-ehabi
-backend-option -arm-enable-ehabi-descriptors -target-linker-version 127.2 -g
-ffunction-sections -coverage-file
/var/folders/h2/1pk8nkxj33x14hngy_4srw7w0000gn/T/LocklessPoolAllocator-SHVOjN.s
-resource-dir
/libraries/android-ndk-r9/toolchains/llvm-3.3/prebuilt/darwin-x86_64/bin/../lib/clang/3.3
-dependency-file
./obj/local/armeabi-v7a/objs/dfcore/Src/LocklessPoolAllocator.o.d -MT
./obj/local/armeabi-v7a/objs/dfcore/Src/LocklessPoolAllocator.o -MP -D NDEBUG
-D ANDROID -D _LIB -D _RELEASE -D ANDROID_NDK -D DISABLE_IMPORTGL -I
/Users/alvion/df/joev.Cave-droid/Cave-droid/Common/Code/NonDF/SDL2/include -I
/Users/alvion/df/joev.Cave-droid/Cave-droid/Common/Code -I
/Users/alvion/df/joev.Cave-droid/Cave-droid/Common/Code/NonDF -I
/libraries/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.8/include -I
/libraries/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include
-I /libraries/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.8/include/backward
-I /Users/alvion/df/joev.Cave-droid/Cave-droid/Common/Code/DFCore -I
/libraries/android-ndk-r9/platforms/android-9/arch-arm/usr/include
-internal-isystem /usr/local/include -internal-isystem
/libraries/android-ndk-r9/toolchains/llvm-3.3/prebuilt/darwin-x86_64/bin/../lib/clang/3.3/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-Wno-switch -Wno-unused-variable -Wformat -Werror=format-security -w
-fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir
/Users/alvion/df/joev.Cave-droid/Cave-droid/Cave/Code/Host-Ant/Android
-ferror-limit 19 -fmessage-length 138 -stack-protector 1 -mstackrealign -mllvm
-disable-global-ctor-const-promotion -fno-signed-char -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fdiagnostics-show-option
-fcolor-diagnostics -backend-option -vectorize-loops
-fno-cxx-missing-return-semantics -o
/var/folders/h2/1pk8nkxj33x14hngy_4srw7w0000gn/T/LocklessPoolAllocator-SHVOjN.s
-x c++
/Users/alvion/df/joev.Cave-droid/Cave-droid/Common/Code/DFCore/Src/LocklessPoolAllocator.cpp
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module
'/Users/alvion/df/joev.Cave-droid/Cave-droid/Common/Code/DFCore/Src/LocklessPoolAllocator.cpp'.
4. Running pass 'ARM Assembly / Object Emitter' on function
'@_ZN21LocklessPoolAllocator8ShutdownEv'
clang++: error: unable to execute command: Illegal instruction: 4
clang++: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3
Target: armv7-none-linux-androideabi
Thread model: posix
clang++: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://source.android.com/source/report-bugs.html">http://source.android.com/source/report-bugs.html</a> 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/h2/1pk8nkxj33x14hngy_4srw7w0000gn/T/LocklessPoolAllocator-RN0D9V.cpp
clang++: note: diagnostic msg:
/var/folders/h2/1pk8nkxj33x14hngy_4srw7w0000gn/T/LocklessPoolAllocator-RN0D9V.sh
clang++: note: diagnostic msg:
********************
make: *** [obj/local/armeabi-v7a/objs/dfcore/Src/LocklessPoolAllocator.o] Error
254</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>