[LLVMbugs] [Bug 13394] New: clang crash

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 18 15:49:56 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13394

             Bug #: 13394
           Summary: clang crash
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: berkus at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8918
  --> http://llvm.org/bugs/attachment.cgi?id=8918
cpp source which crashed

[172/267] cxx: modules/tcb/gatekeeper_mod/gatekeeper.cpp ->
_build_/modules/tcb/gatekeeper_mod/gatekeeper.cpp.1.o
clang(71719) malloc: *** error for object 0x7fb3c088a120: pointer being
realloc'd was not allocated
*** set a breakpoint in malloc_error_break to debug
0  clang             0x000000010bfdd162
llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 14034
1  clang             0x000000010bfdd5d9
llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 15177
2  libsystem_c.dylib 0x00007fff8aa73cfa _sigtramp + 26
3  libsystem_c.dylib 0x00007fb3c0842e00 _sigtramp + 18446743748195709216
4  libsystem_c.dylib 0x00007fff8aa7212d calloc + 0
5  clang             0x000000010bfde26c
std::__1::__split_buffer<std::__1::pair<void (*)(void*), void*>,
std::__1::allocator<std::__1::pair<void (*)(void*), void*>
>&>::push_front(std::__1::pair<void (*)(void*), void*> const&) + 3004
6  clang             0x000000010b055059 llvm::SmallVectorImpl<unsigned
int>::swap(llvm::SmallVectorImpl<unsigned int>&) + 61961
7  clang             0x000000010b050e17 llvm::SmallVectorImpl<unsigned
int>::swap(llvm::SmallVectorImpl<unsigned int>&) + 44999
8  clang             0x000000010afaf9f0 clang::ObjCObjectPointerType const*
clang::Type::castAs<clang::ObjCObjectPointerType>() const + 51552
9  clang             0x000000010b079d2e std::__1::__tree<clang::Decl*,
std::__1::less<clang::Decl*>, std::__1::allocator<clang::Decl*>
>::destroy(std::__1::__tree_node<clang::Decl*, void*>*) + 140494
10 clang             0x000000010b079402 std::__1::__tree<clang::Decl*,
std::__1::less<clang::Decl*>, std::__1::allocator<clang::Decl*>
>::destroy(std::__1::__tree_node<clang::Decl*, void*>*) + 138146
11 clang             0x000000010afac5cd clang::ObjCObjectPointerType const*
clang::Type::castAs<clang::ObjCObjectPointerType>() const + 38205
12 clang             0x000000010ae40b66
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 7990
13 clang             0x000000010ae438e0
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 19632
14 clang             0x000000010ae3ee37
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 519
15 clang             0x000000010ae3ed91
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 353
16 clang             0x000000010ae6731c
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 165612
17 clang             0x000000010ae66c7b
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 163915
18 clang             0x000000010ae6640a
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 161754
19 clang             0x000000010ae6d576
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 190790
20 clang             0x000000010ae666bc
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 162444
21 clang             0x000000010ae6640a
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 161754
22 clang             0x000000010ae68e45
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 172565
23 clang             0x000000010ae66d05
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 164053
24 clang             0x000000010ae6640a
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 161754
25 clang             0x000000010ae6d576
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 190790
26 clang             0x000000010ae6f47b
std::__1::__split_buffer<clang::Parser::ParsingClass**,
std::__1::allocator<clang::Parser::ParsingClass**>&>::push_front(clang::Parser::ParsingClass**
const&) + 198731
27 clang             0x000000010ae7e19e
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 35454
28 clang             0x000000010ae221cb
std::__1::__split_buffer<std::__1::pair<llvm::WeakVH, llvm::Constant*>,
std::__1::allocator<std::__1::pair<llvm::WeakVH, llvm::Constant*>
>&>::push_front(std::__1::pair<llvm::WeakVH, llvm::Constant*> const&) + 103739
29 clang             0x000000010ae7d708
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 32744
30 clang             0x000000010ae7d03a
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 31002
31 clang             0x000000010ae7c70c
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 28652
32 clang             0x000000010ae7bb97
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 25719
33 clang             0x000000010ae15fc6
std::__1::__split_buffer<std::__1::pair<llvm::WeakVH, llvm::Constant*>,
std::__1::allocator<std::__1::pair<llvm::WeakVH, llvm::Constant*>
>&>::push_front(std::__1::pair<llvm::WeakVH, llvm::Constant*> const&) + 54070
34 clang             0x000000010addde87
std::__1::__split_buffer<clang::CXXRecordDecl const*,
std::__1::allocator<clang::CXXRecordDecl
const*>&>::push_front(clang::CXXRecordDecl const* const&) + 7111
35 clang             0x000000010abd3e22
std::__1::__split_buffer<clang::FileEntry const*,
std::__1::allocator<clang::FileEntry const*>&>::push_front(clang::FileEntry
const* const&) + 12274
36 clang             0x000000010abb1f78
std::__1::__split_buffer<clang::CompilerInstance*,
std::__1::allocator<clang::CompilerInstance*>&>::push_front(clang::CompilerInstance*
const&) + 16120
37 clang             0x000000010ab96bd4 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*>*) + 4292
38 clang             0x000000010ab8dffd
39 clang             0x000000010ab92b89
std::__1::__split_buffer<std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >,
std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > >&>::push_front(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 1193
40 clang             0x000000010ab8c834
41 clang             0x000000000000008b
Stack dump:
0.    Program arguments: /Users/berkus/Hobby/Metta/toolchain/clang/bin/clang
-cc1 -triple i686-pc-elf -S -disable-free -main-file-name gatekeeper.cpp
-mrelocation-model static -mdisable-fp-elim -relaxed-aliasing -fmath-errno
-mconstructor-aliases -target-cpu pentium4 -target-feature -mmx -target-feature
-sse -target-feature -3dnow -target-linker-version 128.2
-momit-leaf-frame-pointer -g -ffunction-sections -fdata-sections -coverage-file
/var/folders/0g/48dct_nx4k53cssm0d9d0n0r0000gq/T/gatekeeper-yM9pKI.s
-nostdsysteminc -nobuiltininc -resource-dir
/Users/berkus/Hobby/Metta/toolchain/clang/bin/../lib/clang/3.2 -isystem
/Users/berkus/Hobby/Metta/branches/typesystem/src/runtime/libc++/include
-isystem
/Users/berkus/Hobby/Metta/branches/typesystem/src/../../../toolchain/clang/lib/clang/3.2/include
-D __Metta__=1 -D BOCHS_IO_HACKS -D _LIBCPP_NO_IOSTREAMS=1 -D
_LIBCPP_NO_WCHAR=1 -D _LIBCPP_NO_EXCEPTIONS=1 -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/kernel -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/kernel -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/kernel/generic -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/kernel/generic -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/nucleus -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/nucleus -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/nucleus/x86 -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/nucleus/x86 -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/runtime -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/runtime -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/interfaces -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/interfaces -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/interfaces/nemesis -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/interfaces/nemesis -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/kernel/arch/x86 -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/kernel/arch/x86 -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/kernel/platform/pc99
-I /Users/berkus/Hobby/Metta/branches/typesystem/src/kernel/platform/pc99 -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/kernel/arch/shared -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/kernel/arch/shared -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/kernel/platform/shared
-I /Users/berkus/Hobby/Metta/branches/typesystem/src/kernel/platform/shared -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/runtime/libc -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/runtime/libc -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/modules/tcb/gatekeeper_mod
-I /Users/berkus/Hobby/Metta/branches/typesystem/src/modules/tcb/gatekeeper_mod
-I /Users/berkus/Hobby/Metta/branches/typesystem/src/_build_/modules -I
/Users/berkus/Hobby/Metta/branches/typesystem/src/modules -fmodule-cache-path
/var/folders/0g/48dct_nx4k53cssm0d9d0n0r0000gq/T/clang-module-cache -O1 -Wall
-Wextra -Werror -Wno-unused-variable -Wno-unused-parameter
-Wno-unused-private-field -Wno-gnu-array-member-paren-init -Wno-gcc-compat
-std=c++11 -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir
/Users/berkus/Hobby/Metta/branches/typesystem/src -ferror-limit 19
-fmessage-length 178 -fvisibility hidden -fvisibility-inlines-hidden
-ffreestanding -mstackrealign -fno-builtin -fno-rtti -fobjc-runtime=gnu-fragile
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/0g/48dct_nx4k53cssm0d9d0n0r0000gq/T/gatekeeper-yM9pKI.s -x c++
../modules/tcb/gatekeeper_mod/gatekeeper.cpp 
1.    ../modules/tcb/gatekeeper_mod/gatekeeper.cpp:77:34: current parser token
')'
2.    ../modules/tcb/gatekeeper_mod/gatekeeper.cpp:73:1: parsing function body
'create_simple'
3.    ../modules/tcb/gatekeeper_mod/gatekeeper.cpp:73:1: in compound statement
('{}')
4.    ../modules/tcb/gatekeeper_mod/gatekeeper.cpp:76:2: in compound statement
('{}')
clang: error: unable to execute command: Abort trap: 6
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (trunk 159656)
Target: i686-pc-elf
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/0g/48dct_nx4k53cssm0d9d0n0r0000gq/T/gatekeeper-Jd5PbF.cpp
clang: note: diagnostic msg:
/var/folders/0g/48dct_nx4k53cssm0d9d0n0r0000gq/T/gatekeeper-Jd5PbF.sh
clang: note: diagnostic msg: 

********************

-- 
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