---- 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
I think that's by design (it won't cross page boundary though).
I agree, that is what is happening here. I think this is invalid, so I am closing it.
*** Bug 67292 has been marked as a duplicate of this bug. ***
It should be possible to create a suppression file to silence false positives: http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress but a comment in the code search_line_sse2 (lex.c:372) is probably as good to avoid further duplicates.