public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/115274] New: Bogus -Wstringop-overread in SQLite source code
@ 2024-05-29 12:07 boris at kolpackov dot net
  2024-05-29 12:08 ` [Bug tree-optimization/115274] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: boris at kolpackov dot net @ 2024-05-29 12:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115274

            Bug ID: 115274
           Summary: Bogus -Wstringop-overread in SQLite source code
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: boris at kolpackov dot net
  Target Milestone: ---

Compiled attached sqlite3.c from recent SQLite release with GCC 14 and -O3
produces the following bogus (according to our analysis) warning:

$ gcc-14 -O3 -c sqlite3.c
In function ‘sqlite3Strlen30’,
    inlined from ‘sqlite3ColumnSetColl’ at sqlite3.c:115936:10:
sqlite3.c:33361:28: warning: ‘strlen’ reading 1 or more bytes from a region of
size 0 [-Wstringop-overread]
33361 |   return 0x3fffffff & (int)strlen(z);
      |                            ^~~~~~~~~
In function ‘sqlite3ColumnSetColl’:
cc1: note: source object is likely at address zero

$ gcc-14 --version
gcc-14 (Debian 14.1.0-1) 14.1.0

There is no such warning with GCC 13.2.0.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-06-29 15:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-29 12:07 [Bug c/115274] New: Bogus -Wstringop-overread in SQLite source code boris at kolpackov dot net
2024-05-29 12:08 ` [Bug tree-optimization/115274] " pinskia at gcc dot gnu.org
2024-05-29 12:15 ` boris at kolpackov dot net
2024-05-29 12:35 ` sjames at gcc dot gnu.org
2024-05-29 12:46 ` boris at kolpackov dot net
2024-06-28 20:41 ` pinskia at gcc dot gnu.org
2024-06-28 21:07 ` drh at sqlite dot org
2024-06-28 22:53 ` andi-gcc at firstfloor dot org
2024-06-28 22:57 ` andi-gcc at firstfloor dot org
2024-06-29  1:58 ` ak at gcc dot gnu.org
2024-06-29 15:57 ` andi-gcc at firstfloor dot 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).