This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/47311] [C++0x] ICE in tsubst @cp/pt.c:10502


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47311

--- Comment #9 from Pawel Sikora <pluto at agmk dot net> 2011-01-16 01:10:32 UTC ---
without SSE2 vectorized lexer:

==2012== Invalid read of size 8
==2012==    at 0xB43064: search_line_acc_char (lex.c:263)
==2012==    by 0xB434FE: _cpp_clean_line (lex.c:669)
==2012==    by 0xB43F17: _cpp_get_fresh_line (lex.c:1888)
==2012==    by 0xB456FD: _cpp_lex_direct (lex.c:1953)
==2012==    by 0xB46576: _cpp_lex_token (lex.c:1827)
==2012==    by 0xB48BE7: cpp_get_token (macro.c:1240)
==2012==    by 0xB48E7F: cpp_get_token_with_location (macro.c:1352)
==2012==    by 0x4F9F82: c_lex_with_flags (c-lex.c:302)
==2012==    by 0x46382F: cp_lexer_get_preprocessor_token (parser.c:548)
==2012==    by 0x47CA22: c_parse_file (parser.c:425)
==2012==    by 0x4FDA74: c_common_parse_file (c-opts.c:1071)
==2012==    by 0x727973: toplev_main (toplev.c:579)
==2012==  Address 0x531cd00 is 160 bytes inside a block of size 163 alloc'd
==2012==    at 0x4C25322: realloc (vg_replace_malloc.c:525)
==2012==    by 0xB6D38C: xrealloc (xmalloc.c:179)
==2012==    by 0xB37F5F: _cpp_convert_input (charset.c:1734)
==2012==    by 0xB402F2: read_file (files.c:648)
==2012==    by 0xB4150A: _cpp_stack_file (files.c:723)
==2012==    by 0xB38D60: do_include_common (directives.c:792)
==2012==    by 0xB3A260: _cpp_handle_directive (directives.c:491)
==2012==    by 0xB46594: _cpp_lex_token (lex.c:1839)
==2012==    by 0xB48BE7: cpp_get_token (macro.c:1240)
==2012==    by 0xB48E7F: cpp_get_token_with_location (macro.c:1352)
==2012==    by 0x4F9F82: c_lex_with_flags (c-lex.c:302)
==2012==    by 0x46382F: cp_lexer_get_preprocessor_token (parser.c:548)
==2012==
==2012==
==2012== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y
==2012== starting debugger with cmd: gdb --nw /proc/2013/fd/1014 2013
GNU gdb (GDB) PLD Linux (7.2-1)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pld-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /proc/2013/fd/1014...done.
Attaching to program: /proc/2013/fd/1014, process 2013
Reading symbols from /usr/lib64/valgrind/vgpreload_core-amd64-linux.so...done.
Loaded symbols for /usr/lib64/valgrind/vgpreload_core-amd64-linux.so
Reading symbols from
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so...done.
Loaded symbols for /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so
Reading symbols from /lib64/libc.so.6...Reading symbols from
/usr/lib/debug/lib64/libc-2.12.2.so.debug...done.
done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from
/usr/lib/debug/lib64/ld-2.12.2.so.debug...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x0000000000b43064 in search_line_acc_char (s=<value optimized out>, end=<value
optimized out>) at ../../libcpp/lex.c:263
263           val = *++p;
(gdb) bt
#0  0x0000000000b43064 in search_line_acc_char (s=<value optimized out>,
end=<value optimized out>) at ../../libcpp/lex.c:263
#1  0x0000000000b434ff in _cpp_clean_line (pfile=0x521d260) at
../../libcpp/lex.c:669
#2  0x0000000000b43f18 in _cpp_get_fresh_line (pfile=0x521d260) at
../../libcpp/lex.c:1888
#3  0x0000000000b456fe in _cpp_lex_direct (pfile=0x521d260) at
../../libcpp/lex.c:1953
#4  0x0000000000b46577 in _cpp_lex_token (pfile=0x521d260) at
../../libcpp/lex.c:1827
#5  0x0000000000b48be8 in cpp_get_token (pfile=0x521d260) at
../../libcpp/macro.c:1240
#6  0x0000000000b48e80 in cpp_get_token_with_location (pfile=0x521d260,
loc=0x4141184) at ../../libcpp/macro.c:1352
#7  0x00000000004f9f83 in c_lex_with_flags (value=0x4141188, loc=0x4141184,
cpp_flags=0x4141182 "", lex_flags=2) at ../../gcc/c-family/c-lex.c:302
#8  0x0000000000463830 in cp_lexer_get_preprocessor_token (lexer=<value
optimized out>, token=0x4141180) at ../../gcc/cp/parser.c:548
#9  0x000000000047ca23 in cp_lexer_new_main () at ../../gcc/cp/parser.c:425
#10 cp_parser_new () at ../../gcc/cp/parser.c:3197
#11 c_parse_file () at ../../gcc/cp/parser.c:25275
#12 0x00000000004fda75 in c_common_parse_file () at
../../gcc/c-family/c-opts.c:1071
#13 0x0000000000727974 in compile_file (argc=62, argv=0x7fefff608) at
../../gcc/toplev.c:579
#14 do_compile (argc=62, argv=0x7fefff608) at ../../gcc/toplev.c:1874
#15 toplev_main (argc=62, argv=0x7fefff608) at ../../gcc/toplev.c:1937
#16 0x0000000004e48cbd in __libc_start_main (main=0x50bdb0 <main>, argc=62,
ubp_av=0x7fefff608, init=<value optimized out>, fini=<value optimized out>,
rtld_fini=<value optimized out>, stack_end=0x7fefff5f8) at libc-start.c:226
#17 0x0000000000402889 in _start () at ../sysdeps/x86_64/elf/start.S:113
(gdb) p p
$1 = (const word_type *) 0x531cd00
(gdb) l
258               int i = acc_char_index (t, val);
259               if (i >= 0)
260                 return (const uchar *)p + i;
261             }
262
263           val = *++p;
264         }
265     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]