[LLVMbugs] [Bug 4129] New: clang parser crash: terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::erase
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun May 3 01:15:32 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4129
Summary: clang parser crash: terminate called after throwing an
instance of 'std::out_of_range'
what(): basic_string::erase
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: edwintorok at gmail.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=2920)
--> (http://llvm.org/bugs/attachment.cgi?id=2920)
testcase-min.i
$ clang testcase-min.i
testcase-min.i:1:62: warning: declaration of 'struct bts_tracer' will not be
visible outside of this function
struct bts_trace { struct ds_trace ds; int (*read)(struct bts_tracer
*tracer, const void *at, struct bts_struct ...
^
testcase-min.i:1:111: warning: declaration of 'struct bts_struct' will not be
visible outside of this function
struct bts_trace { struct ds_trace ds; int (*read)(struct bts_tracer
*tracer, const void *at, struct bts_struct ...
^
testcase-min.i:1:150: warning: declaration of 'struct bts_tracer' will not be
visible outside of this function
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::erase
0 clang-cc 0x000000000105dfdf
1 clang-cc 0x000000000105e3d9
2 libpthread.so.0 0x00007f7792b0a7b0
3 libc.so.6 0x00007f7791e2a115 gsignal + 53
4 libc.so.6 0x00007f7791e2b633 abort + 387
5 libstdc++.so.6 0x00007f77926b0e65 __gnu_cxx::__verbose_terminate_handler()
+ 277
6 libstdc++.so.6 0x00007f77926af256
7 libstdc++.so.6 0x00007f77926af283
8 libstdc++.so.6 0x00007f77926af37e
9 libstdc++.so.6 0x00007f779264ec17 std::__throw_out_of_range(char const*) +
103
10 clang-cc 0x00000000006acfb8
11 clang-cc 0x00000000006ae1ec
12 clang-cc 0x00000000006af60b
13 clang-cc 0x000000000078c285
14 clang-cc 0x00000000005ad925
15 clang-cc 0x00000000005b67a2
16 clang-cc 0x00000000007310d5
17 clang-cc 0x00000000007252a1
18 clang-cc 0x0000000000726077
19 clang-cc 0x0000000000727824
clang::Parser::ParseDirectDeclarator(clang::Declarator&) + 676
20 clang-cc 0x00000000007230aa
21 clang-cc 0x0000000000728963
22 clang-cc 0x000000000072978b
23 clang-cc 0x00000000007316b6
24 clang-cc 0x00000000007252a1
25 clang-cc 0x000000000071d482
26 clang-cc 0x000000000071edf2
27 clang-cc 0x000000000071f206
28 clang-cc 0x00000000005ad5e3
29 clang-cc 0x000000000047f19f
30 clang-cc 0x0000000000480631 main + 1985
31 libc.so.6 0x00007f7791e165a6 __libc_start_main + 230
32 clang-cc 0x000000000042b5a9
Stack dump:
0. Program arguments: /usr/local/bin/../libexec/clang-cc -triple
x86_64-unknown-linux-gnu -S -disable-free -main-file-name testcase-min.i
--relocation-model static --disable-fp-elim --unwind-tables=1 --fmath-errno=1
-fdiagnostics-show-option -o /tmp/cc-ZzEXpP.s -x cpp-output testcase-min.i
1. testcase-min.i:1:161: current parser token '*'
2. testcase-min.i:1:2: parsing struct/union body 'bts_trace'
If I reformat the input using topformflat clang no longer crashes, it only
crashes if everything is on one line.
--
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