[Bug analyzer/120213] analyzer report a false positive

2025-05-12 Thread raffaellobertini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213 --- Comment #9 from Raffaello Bertini --- (In reply to David Malcolm from comment #8) > I'm not sure I fully grok the example code, but FWIW the analyzer doesn't > yet "know" about the behavior of strnlen and so conservatively assumes any > poss

[Bug analyzer/120213] analyzer report a false positive

2025-05-12 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213 --- Comment #8 from David Malcolm --- I'm not sure I fully grok the example code, but FWIW the analyzer doesn't yet "know" about the behavior of strnlen and so conservatively assumes any possible size_t value as the output. There are also limit

[Bug analyzer/120213] analyzer report a false positive

2025-05-12 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213 --- Comment #7 from David Malcolm --- Reproducer on Compiler Explorer (with gcc trunk): https://godbolt.org/z/darnMzMr3

[Bug analyzer/120213] analyzer report a false positive

2025-05-10 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213 --- Comment #6 from Sam James --- Looks like it doesn't default to UTF8: https://github.com/Microsoft/vscode/issues/19837.

[Bug analyzer/120213] analyzer report a false positive

2025-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213 --- Comment #5 from Andrew Pinski --- (In reply to Andrew Pinski from comment #4) > I would complain to VScode because it is works just fine for other terminals > that implement ascii control characters with UTF-8. Oh XScode should be using the

[Bug analyzer/120213] analyzer report a false positive

2025-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213 --- Comment #4 from Andrew Pinski --- (In reply to Raffaello Bertini from comment #3) > (In reply to Sam James from comment #2) > > I can't reproduce that corrupted output. Did you get that from a CI system > > or something like that? > > no i

[Bug analyzer/120213] analyzer report a false positive

2025-05-10 Thread raffaellobertini at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213 --- Comment #3 from Raffaello Bertini --- (In reply to Sam James from comment #2) > I can't reproduce that corrupted output. Did you get that from a CI system > or something like that? no i had that from the embedded terminal of the IDE VsCode

[Bug analyzer/120213] analyzer report a false positive

2025-05-10 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213 --- Comment #2 from Sam James --- I can't reproduce that corrupted output. Did you get that from a CI system or something like that?

[Bug analyzer/120213] analyzer report a false positive

2025-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213 --- Comment #1 from Andrew Pinski --- >Also the output seems a little bit corrupted: That looks like a cmake issue and not a GCC issue. See https://godbolt.org/z/P4WbhT4Ee