public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rogerio.souza at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107852] [12 Regression] Spurious warnings stringop-overflow and array-bounds copying data as bytes into vector Date: Thu, 29 Jun 2023 18:08:44 +0000 [thread overview] Message-ID: <bug-107852-4-rV4j0kbhGE@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107852-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107852 Rogério de Souza Moraes <rogerio.souza at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rogerio.souza at gmail dot com --- Comment #16 from Rogério de Souza Moraes <rogerio.souza at gmail dot com> --- I have a similar issue that happens using GCC v13.1.0 on Red Hat 7.9 3.10.0-1160.90.1.el7.x86_64. The compiler configuration settings are: /grid/common/test/gcc-v13.1.0d1rh74_lnx86/bin/gcc -v Using built-in specs. COLLECT_GCC=/grid/common/test/gcc-v13.1.0d1rh74_lnx86/bin/gcc COLLECT_LTO_WRAPPER=/grid/common/test/gcc-v13.1.0d1rh74_lnx86/libexec/gcc/x86_64-redhat-linux/13.1.0/lto-wrapper Target: x86_64-redhat-linux Configured with: /tmp/gcc-v13.1.0d1rh74_lnx86/gcc.source/configure --prefix=/grid/common/test/gcc-v13.1.0d1rh74_lnx86 --with-pkgversion=Cadence --disable-libgcj --enable-threads=posix --enable-shared --with-system-zlib --enable-checking=release --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,fortran --disable-nls --enable-gnu-unique-object --enable-bootstrap --enable-plugin --enable-linker-build-id --enable-gnu-indirect-function --enable-install-libiberty --with-tune=generic --enable-initfini-array --enable-multiarch --with-linker-hash-style=gnu --with-ld=/grid/common/test/gcc-v13.1.0d1rh74_lnx86/bin/ld --with-as=/grid/common/test/gcc-v13.1.0d1rh74_lnx86/bin/as --build=x86_64-redhat-linux --host=x86_64-redhat-linux Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.1.0 (Cadence) ========================================================= The command line to reproduce the crash and the compiler output: /opt/gcc-v13.1.0d1rh74_lnx86/bin/gcc -c -fpic -std=c++2b -pthread -D_GLIBCXX_USE_CXX11_ABI=1 -Wstrict-aliasing=3 -O3 -Wall -Werror -DNDEBUG -Wstrict-aliasing=3 -Wextra -DET7 -DETX=7 -DCMG_QT_VERSION='"MAIN_WXE_23.05.539.d000-Z2, VEngineering"' -DLINUX2 -I/opt/ua/3party/capnproto -I/opt/ua/Framework -I. -I.. -I/opt/ap/include -I/grid/cva/p4/eugene/gcc_wxe/ua/include -I/opt/ua/3party/xlm_inst/include -MMD ../radbSerializer.C In file included from /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/string:51, from /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/stdexcept:39, from ../radbSerializer.C:9: In static member function 'static constexpr _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = long unsigned int; _Up = long unsigned int; bool _IsMove = false]', inlined from 'constexpr _OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_algobase.h:506:3 , inlined from 'constexpr _OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_algobase.h:533:4 , inlined from 'constexpr _OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_algobase.h:540:31, inlined from 'constexpr _OI std::copy(_II, _II, _OI) [with _II = long unsigned int*; _OI = long unsigned int*]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_algobase.h:633:7, inlined from 'constexpr std::vector<bool, _Alloc>::iterator std::vector<bool, _Alloc>::_M_copy_aligned(const_iterator, const_iterator, iterator) [with _Alloc = std::allocator<bool>]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_bvector.h:1303:28, inlined from 'constexpr void std::vector<bool, _Alloc>::_M_reallocate(size_type) [with _Alloc = std::allocator<bool>]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/vector.tcc:851:40, inlined from 'constexpr void std::vector<bool, _Alloc>::reserve(size_type) [with _Alloc = std::allocator<bool>]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_bvector.h:1091:17, inlined from 'radb::ScopesSerializer::ScopesSerializer()' at ../radbSerializer.C:25:24: /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_algobase.h:437:30: error: 'void* __builtin_memmove(void*, const void*, long unsigned int)' forming offset 8 is out of the bounds [0, 8] [-Werror=array-bounds=] 437 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In static member function 'static constexpr _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = long unsigned int; _Up = long unsigned int; bool _IsMove = false]', inlined from 'constexpr _OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_algobase.h:506:3 , inlined from 'constexpr _OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_algobase.h:533:4 , inlined from 'constexpr _OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_algobase.h:540:31, inlined from 'constexpr _OI std::copy(_II, _II, _OI) [with _II = long unsigned int*; _OI = long unsigned int*]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_algobase.h:633:7, inlined from 'constexpr std::vector<bool, _Alloc>::iterator std::vector<bool, _Alloc>::_M_copy_aligned(const_iterator, const_iterator, iterator) [with _Alloc = std::allocator<bool>]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_bvector.h:1303:28, inlined from 'constexpr void std::vector<bool, _Alloc>::_M_reallocate(size_type) [with _Alloc = std::allocator<bool>]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/vector.tcc:851:40, inlined from 'constexpr void std::vector<bool, _Alloc>::reserve(size_type) [with _Alloc = std::allocator<bool>]' at /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_bvector.h:1091:17, inlined from 'radb::VarsSerializer::VarsSerializer()' at ../radbSerializer.C:93:27: /opt/gcc-v13.1.0d1rh74_lnx86/include/c++/13.1.0/bits/stl_algobase.h:437:30: error: 'void* __builtin_memmove(void*, const void*, long unsigned int)' forming offset 8 is out of the bounds [0, 8] [-Werror=array-bounds=] 437 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors ========================================================= The the preprocessed file "radbSerializer.ii" is attached. This might means that this issue was still not totally fixed on GCC v13.1.0 Regards, Rogerio
next prev parent reply other threads:[~2023-06-29 18:08 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-23 23:24 [Bug tree-optimization/107852] New: " cuzdav at gmail dot com 2022-11-23 23:31 ` [Bug tree-optimization/107852] " pinskia at gcc dot gnu.org 2022-11-24 1:12 ` pinskia at gcc dot gnu.org 2022-11-24 7:07 ` rguenth at gcc dot gnu.org 2022-11-24 7:08 ` [Bug tree-optimization/107852] [12/13 Regression] " rguenth at gcc dot gnu.org 2022-11-29 11:46 ` rguenth at gcc dot gnu.org 2022-11-29 11:47 ` [Bug libstdc++/107852] " rguenth at gcc dot gnu.org 2022-11-29 12:01 ` redi at gcc dot gnu.org 2022-11-29 12:26 ` rguenth at gcc dot gnu.org 2022-11-29 13:30 ` cvs-commit at gcc dot gnu.org 2022-11-29 13:31 ` rguenth at gcc dot gnu.org 2022-11-29 16:50 ` redi at gcc dot gnu.org 2022-11-29 17:14 ` cvs-commit at gcc dot gnu.org 2023-03-19 10:31 ` [Bug libstdc++/107852] [12 " dvirtz at gmail dot com 2023-04-20 13:57 ` cvs-commit at gcc dot gnu.org 2023-04-27 11:44 ` rguenth at gcc dot gnu.org 2023-05-01 13:12 ` pinskia at gcc dot gnu.org 2023-06-29 18:08 ` rogerio.souza at gmail dot com [this message] 2023-06-29 18:12 ` rogerio.souza at gmail dot com 2023-06-29 19:16 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-107852-4-rV4j0kbhGE@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).