[Bug middle-end/119693] GCC assumes wrong bounds for strlen() return value, causing bogus bounds check elimination

2025-04-09 Thread jannh at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119693 --- Comment #6 from Jann Horn --- @Andrew/Jakub: I am not convinced that that is theoretically in line with the standard, but you've convinced me that it might be somewhat reasonable for the compiler to assume in practice. (Though regarding the

[Bug middle-end/119693] GCC assumes wrong bounds for strlen() return value, causing bogus bounds check elimination

2025-04-09 Thread jannh at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119693 --- Comment #8 from Jann Horn --- (In reply to Harald van Dijk from comment #7) > I think implementations have two valid ways of dealing with this: either > malloc must fail to allocate such a large object, or standard library > functions must h

[Bug middle-end/119693] GCC assumes wrong bounds for strlen() return value, causing bogus bounds check elimination

2025-04-09 Thread jannh at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119693 Jann Horn changed: What|Removed |Added CC||amacleod at redhat dot com --- Comment #1 f

[Bug middle-end/119693] New: GCC assumes wrong bounds for strlen() return value, causing bogus bounds check elimination

2025-04-09 Thread jannh at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119693 Bug ID: 119693 Summary: GCC assumes wrong bounds for strlen() return value, causing bogus bounds check elimination Product: gcc Version: 14.2.0 Status: UNCONFIRMED