public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/107087] New: bits/stl_algobase.h:431: warning: 'void* __builtin_memcpy(void*, const void*, unsigned int)' reading between 8 and 2147483644 bytes from a region of size 4 [-Wstringop-overread]
@ 2022-09-29 14:35 redi at gcc dot gnu.org
  2023-03-09 20:48 ` [Bug tree-optimization/107087] " redi at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: redi at gcc dot gnu.org @ 2022-09-29 14:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107087
           Summary: bits/stl_algobase.h:431: warning: 'void*
                    __builtin_memcpy(void*, const void*, unsigned int)'
                    reading between 8 and 2147483644 bytes from a region
                    of size 4 [-Wstringop-overread]
           Product: gcc
           Version: 12.2.1
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---
            Target: i?86-pc-linux-gnu

Created attachment 53640
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53640&action=edit
Gzipped preprocessed output

There are bogus warnings when compiling the attached file using:

g++ -O2 3.ii -m32 -c

/usr/include/c++/12/bits/stl_algobase.h:431:30: warning: ‘void*
__builtin_memcpy(void*, const void*, unsigned int)’ reading between 8 and
2147483644 bytes from a region of size 4 [-Wstringop-overread]
  431 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_algobase.h:431:30: warning: ‘void*
__builtin_memcpy(void*, const void*, unsigned int)’ reading between 8 and
2147483644 bytes from a region of size 4 [-Wstringop-overread]
  431 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


The warnings are still there on trunk, but -Warray-bounds instead of
-Wstringop-overread.

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

end of thread, other threads:[~2023-05-08 12:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29 14:35 [Bug middle-end/107087] New: bits/stl_algobase.h:431: warning: 'void* __builtin_memcpy(void*, const void*, unsigned int)' reading between 8 and 2147483644 bytes from a region of size 4 [-Wstringop-overread] redi at gcc dot gnu.org
2023-03-09 20:48 ` [Bug tree-optimization/107087] " redi at gcc dot gnu.org
2023-03-09 20:49 ` [Bug tree-optimization/107087] [13 Regression] " redi at gcc dot gnu.org
2023-03-15 10:00 ` rguenth at gcc dot gnu.org
2023-03-27 13:00 ` rguenth at gcc dot gnu.org
2023-03-27 13:52 ` rguenth at gcc dot gnu.org
2023-03-27 14:00 ` redi at gcc dot gnu.org
2023-03-28 13:25 ` cvs-commit at gcc dot gnu.org
2023-03-28 13:26 ` rguenth at gcc dot gnu.org
2023-03-30  8:31 ` redi at gcc dot gnu.org
2023-03-31 11:36 ` [Bug tree-optimization/107087] [12/13 " rguenth at gcc dot gnu.org
2023-03-31 11:55 ` redi at gcc dot gnu.org
2023-03-31 12:43 ` redi at gcc dot gnu.org
2023-03-31 22:45 ` cvs-commit at gcc dot gnu.org
2023-03-31 23:25 ` [Bug tree-optimization/107087] [12 " redi at gcc dot gnu.org
2023-04-27 11:50 ` rguenth at gcc dot gnu.org
2023-04-27 12:00 ` redi at gcc dot gnu.org
2023-04-29  0:41 ` sjames at gcc dot gnu.org
2023-04-29  6:56 ` redi at gcc dot gnu.org
2023-04-29  7:02 ` sjames at gcc dot gnu.org
2023-05-08 12:25 ` rguenth at gcc dot gnu.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).