public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/45386]  New: [4.6 Regression] valgrind reports out-of-bounds read in search_line_sse2
@ 2010-08-23 18:01 zsojka at seznam dot cz
  2010-08-23 20:05 ` [Bug preprocessor/45386] " rguenth at gcc dot gnu dot org
  2010-09-02 11:19 ` rguenth at gcc dot gnu dot org
  0 siblings, 2 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2010-08-23 18:01 UTC (permalink / raw)
  To: gcc-bugs

---- testcase.c ----
int i;
--------------------
Actually, it seems any C file will suffice to reproduce.

Valgrind output:
$ valgrind -q --trace-children=yes gcc testcase.c -c
==10251== Invalid read of size 8
==10251==    at 0xFEE4F3: search_line_sse2 (lex.c:372)
==10251==    by 0xFEE6E9: _cpp_clean_line (lex.c:649)
==10251==    by 0xFEF0E7: _cpp_get_fresh_line (lex.c:1862)
==10251==    by 0xFF0871: _cpp_lex_direct (lex.c:1927)
==10251==    by 0xFF1666: _cpp_lex_token (lex.c:1801)
==10251==    by 0xFF3DA7: cpp_get_token (macro.c:1240)
==10251==    by 0xFF405F: cpp_get_token_with_location (macro.c:1352)
==10251==    by 0x54977C: c_lex_with_flags (c-lex.c:302)
==10251==    by 0x502FE7: c_lex_one_token (c-parser.c:204)
==10251==    by 0x513367: c_parse_file (c-parser.c:320)
==10251==    by 0x54EE0A: c_common_parse_file (c-opts.c:1206)
==10251==    by 0x8AB1D8: toplev_main (toplev.c:971)
==10251==  Address 0x710b9c8 is 0 bytes after a block of size 8 alloc'd
==10251==    at 0x4C261DF: realloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==10251==    by 0x1017B6C: xrealloc (xmalloc.c:179)
==10251==    by 0xFE32BF: _cpp_convert_input (charset.c:1734)
==10251==    by 0xFEBC52: read_file (files.c:648)
==10251==    by 0xFEC67A: _cpp_stack_file (files.c:723)
==10251==    by 0xFEDF60: cpp_read_main_file (init.c:570)
==10251==    by 0x54E4BA: c_common_post_options (c-opts.c:1124)
==10251==    by 0x8AA6D4: toplev_main (toplev.c:1743)
==10251==    by 0x6589BBC: (below main) (in /lib64/libc-2.11.2.so)
==10251== 

Tested revisions:
r163468 - fail
r162940 - OK
r161659 - OK


-- 
           Summary: [4.6 Regression] valgrind reports out-of-bounds read in
                    search_line_sse2
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <bug-45386-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2015-08-20 16:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-23 18:01 [Bug preprocessor/45386] New: [4.6 Regression] valgrind reports out-of-bounds read in search_line_sse2 zsojka at seznam dot cz
2010-08-23 20:05 ` [Bug preprocessor/45386] " rguenth at gcc dot gnu dot org
2010-09-02 11:19 ` rguenth at gcc dot gnu dot org
     [not found] <bug-45386-4@http.gcc.gnu.org/bugzilla/>
2010-09-29 16:17 ` tromey at gcc dot gnu.org
2015-08-20 15:56 ` pinskia at gcc dot gnu.org
2015-08-20 16:27 ` manu at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).