[LLVMbugs] [Bug 10964] New: Segmentation fault in llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) when compiling source with -g flag
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Sep 20 06:38:00 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10964
Summary: Segmentation fault in
llvm::SmallVectorTemplateBase<llvm_regmatch_t,
false>::grow(unsigned long) when compiling source with
-g flag
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: tm at ayena.de
CC: llvmbugs at cs.uiuc.edu
LLVM/Clang revision: 140141
The crash only happens with '-g' flag. Source compiles with
i686-apple-darwin10-g++-4.2.1 without crash.
Failing Code:
namespace foo {
namespace date_time {
const char* nth_as_str(int ele) {
return 0;
}
}
}
Stacktrace:
~/llvm/bin/clang++ -g -o clang_bug.o -c clang_bug.ii.cpp
0 clang 0x00000001014d7d12
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
2338
1 clang 0x00000001014d8349
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
3929
2 libSystem.B.dylib 0x00007fff859ce1ba _sigtramp + 26
3 libSystem.B.dylib 0x0000000000000049 _sigtramp + 2053316265
4 clang 0x000000010141246e
llvm::LeakDetectorImpl<llvm::Value>::hasGarbage(std::string const&) + 4206
5 clang 0x00000001012ac49a
llvm::cast_retty<llvm::ConstantPointerNull, llvm::Value*>::ret_type
llvm::cast<llvm::ConstantPointerNull, llvm::Value*>(llvm::Value* const&) +
44074
6 clang 0x000000010017eaf5 llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::splice(llvm::ilist_iterator<llvm::Instruction>,
llvm::iplist<llvm::Instruction, llvm::ilist_traits<llvm::Instruction> >&) +
12181
7 clang 0x0000000100186341 llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::splice(llvm::ilist_iterator<llvm::Instruction>,
llvm::iplist<llvm::Instruction, llvm::ilist_traits<llvm::Instruction> >&) +
42977
8 clang 0x000000010017cdf4 llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::splice(llvm::ilist_iterator<llvm::Instruction>,
llvm::iplist<llvm::Instruction, llvm::ilist_traits<llvm::Instruction> >&) +
4756
9 clang 0x000000010017fe80 llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::splice(llvm::ilist_iterator<llvm::Instruction>,
llvm::iplist<llvm::Instruction, llvm::ilist_traits<llvm::Instruction> >&) +
17184
10 clang 0x00000001001862a8 llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::splice(llvm::ilist_iterator<llvm::Instruction>,
llvm::iplist<llvm::Instruction, llvm::ilist_traits<llvm::Instruction> >&) +
42824
11 clang 0x000000010017cdf4 llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::splice(llvm::ilist_iterator<llvm::Instruction>,
llvm::iplist<llvm::Instruction, llvm::ilist_traits<llvm::Instruction> >&) +
4756
12 clang 0x0000000100186c02 llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::splice(llvm::ilist_iterator<llvm::Instruction>,
llvm::iplist<llvm::Instruction, llvm::ilist_traits<llvm::Instruction> >&) +
45218
13 clang 0x000000010018734d llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::splice(llvm::ilist_iterator<llvm::Instruction>,
llvm::iplist<llvm::Instruction, llvm::ilist_traits<llvm::Instruction> >&) +
47085
14 clang 0x000000010023dfaa
clang::BackendConsumer::InlineAsmDiagHandler(llvm::SMDiagnostic const&, void*,
unsigned int) + 4586
15 clang 0x000000010023e857
clang::BackendConsumer::InlineAsmDiagHandler(llvm::SMDiagnostic const&, void*,
unsigned int) + 6807
16 clang 0x0000000100246567 llvm::DenseMap<clang::Expr const*,
llvm::Value*, llvm::DenseMapInfo<clang::Expr const*>,
llvm::DenseMapInfo<llvm::Value*> >::grow(unsigned int) + 22423
17 clang 0x00000001002442bf llvm::DenseMap<clang::Expr const*,
llvm::Value*, llvm::DenseMapInfo<clang::Expr const*>,
llvm::DenseMapInfo<llvm::Value*> >::grow(unsigned int) + 13551
18 clang 0x000000010024562f llvm::DenseMap<clang::Expr const*,
llvm::Value*, llvm::DenseMapInfo<clang::Expr const*>,
llvm::DenseMapInfo<llvm::Value*> >::grow(unsigned int) + 18527
19 clang 0x0000000100249a87 llvm::DenseMap<clang::Expr const*,
llvm::Value*, llvm::DenseMapInfo<clang::Expr const*>,
llvm::DenseMapInfo<llvm::Value*> >::grow(unsigned int) + 36023
20 clang 0x0000000100249adb llvm::DenseMap<clang::Expr const*,
llvm::Value*, llvm::DenseMapInfo<clang::Expr const*>,
llvm::DenseMapInfo<llvm::Value*> >::grow(unsigned int) + 36107
21 clang 0x0000000100249adb llvm::DenseMap<clang::Expr const*,
llvm::Value*, llvm::DenseMapInfo<clang::Expr const*>,
llvm::DenseMapInfo<llvm::Value*> >::grow(unsigned int) + 36107
22 clang 0x000000010025589f llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreatePHI(llvm::Type*, unsigned int, llvm::Twine const&) + 1535
23 clang 0x000000010023cb07
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 167
24 clang 0x000000010025f862 clang::MSP430InterruptAttr*
clang::Decl::getAttr<clang::MSP430InterruptAttr>() const + 946
25 clang 0x000000010023bdb4
llvm::DenseMap<llvm::ValueMapCallbackVH<llvm::Value const*,
llvm::TrackingVH<llvm::Value>, llvm::ValueMapConfig<llvm::Value const*>,
llvm::DenseMapInfo<llvm::TrackingVH<llvm::Value> > >,
llvm::TrackingVH<llvm::Value>,
llvm::DenseMapInfo<llvm::ValueMapCallbackVH<llvm::Value const*,
llvm::TrackingVH<llvm::Value>, llvm::ValueMapConfig<llvm::Value const*>,
llvm::DenseMapInfo<llvm::TrackingVH<llvm::Value> > > >,
llvm::DenseMapInfo<llvm::TrackingVH<llvm::Value> > >::init(unsigned int) + 3572
26 clang 0x00000001000218f7 llvm::DenseMap<clang::IdentifierInfo
const*, unsigned int, llvm::DenseMapInfo<clang::IdentifierInfo const*>,
llvm::DenseMapInfo<unsigned int> >::grow(unsigned int) + 14423
27 clang 0x000000010000a716 llvm::SmallVectorImpl<char
const*>::insert(char const**, char const* const&) + 3078
28 clang 0x0000000100002d35
29 clang 0x000000010000698d std::vector<std::string,
std::allocator<std::string>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string*,
std::vector<std::string, std::allocator<std::string> > >, std::string const&) +
1453
30 clang 0x0000000100001634
31 clang 0x000000000000002a
Stack dump:
0. Program arguments: /Users/tobias/llvm/bin/clang -cc1 -triple
x86_64-apple-macosx10.6.8 -emit-obj -mrelax-all -disable-free -main-file-name
clang_bug.ii.cpp -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -target-linker-version 123.2 -g -coverage-file clang_bug.o
-resource-dir /Users/tobias/llvm/bin/../lib/clang/3.0 -fmodule-cache-path
/var/folders/5m/5mk-kBbrGguxaR0NKdsAyE+++TI/-Tmp-/clang-module-cache
-fdeprecated-macro -ferror-limit 19 -fmessage-length 202 -stack-protector 1
-fblocks -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o clang_bug.o -x c++ clang_bug.ii.cpp
1. <eof> parser at end of file
2. clang_bug.ii.cpp:1:11: LLVM IR generation of declaration 'foo'
3. clang_bug.ii.cpp:3:18: Generating code for declaration
'foo::date_time::nth_as_str'
clang: error: unable to execute command: Segmentation fault
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list