[Bug analyzer/112965] Valgrind error on gcc.dg/analyzer/fd-dup-1.c

2023-12-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112965 --- Comment #5 from Jakub Jelinek --- It could be done just for #ifdef ENABLE_VALGRIND_ANNOTATIONS Perhaps { const char buf[16] = {}; pp_append_text (pp, buf, buf + 16); } ? Anyway, I'm really curious why it works for buffers in libcpp. Because

[Bug analyzer/112965] Valgrind error on gcc.dg/analyzer/fd-dup-1.c

2023-12-12 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112965 --- Comment #4 from David Malcolm --- (In reply to David Malcolm from comment #3) > A workaround might be to pad pp's buffer with trailing zero bytes up to a > multiple of 16. The following hack "fixes" it (for some definition of "fix"): diff

[Bug analyzer/112965] Valgrind error on gcc.dg/analyzer/fd-dup-1.c

2023-12-12 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112965 --- Comment #3 from David Malcolm --- A workaround might be to pad pp's buffer with trailing zero bytes up to a multiple of 16.

[Bug analyzer/112965] Valgrind error on gcc.dg/analyzer/fd-dup-1.c

2023-12-12 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112965 --- Comment #2 from David Malcolm --- In c-parser.cc's consider_macro: 1843pretty_printer pp; 1844pp_string (&pp, (const char *) tok.val.str.text); 1845pp_newline (&pp); 1846cpp_push_buffer (parse_in, 1847

[Bug analyzer/112965] Valgrind error on gcc.dg/analyzer/fd-dup-1.c

2023-12-11 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112965 --- Comment #1 from Jakub Jelinek --- gcc.dg/analyzer/fd-leak-pr108252.c, gcc.dg/analyzer/fd-access-mode-macros.c, gcc.dg/analyzer/fd-4.c, gcc.dg/analyzer/named-constants-Wunused-macros.c etc. fail the same.