From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E26433858401; Fri, 18 Aug 2023 10:00:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E26433858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692352811; bh=3kha4C8XBhPQSaT+NimX8HPOuDZPRAnoIbYVSlnWTqg=; h=From:To:Subject:Date:From; b=yreYX7CnTtA+3tvLNR7J8MMmMbUEddGFhKdvXY2HlPjxOsAUe/gP9k5eVch6Z+Nuc zCP6noxO0ZVkX95F6pHK3t4YQ6A5WgicEnVVhV/7RQNIMV45y1sqt50aIQlkWN2W0+ opLC4nEQwlJCI9LfZOsDRSILFiVQBIYSvWcyN2WQ= From: "sam at gentoo dot org" To: gdb-prs@sourceware.org Subject: [Bug build/30780] New: gdb: -Werror=stringop-overflow build failure Date: Fri, 18 Aug 2023 10:00:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sam at gentoo dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30780 Bug ID: 30780 Summary: gdb: -Werror=3Dstringop-overflow build failure Product: gdb Version: 13.1 Status: NEW Severity: normal Priority: P2 Component: build Assignee: unassigned at sourceware dot org Reporter: sam at gentoo dot org Target Milestone: --- ``` $ gcc --version gcc (Gentoo Hardened 13.2.1_p20230812 p7) 13.2.1 20230812 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ``` ``` make[2]: Entering directory '/home/sam/git/binutils-gdb/gdb' g++ -x c++ -I. -I. -I./config -DLOCALEDIR=3D"\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I../bfd -I./../bfd -I./../include -I./../readline/readline/.. -I./../zlib -I../libdecnumber -I./../libdecnum= ber=20 -I./../gnulib/import -I../gnulib/import -I./.. -I.. -I./../libbacktrace/ -I../libbacktrace/ -DTUI=3D1 -I/usr/include/python3.12 -I/usr/include/python3.12 -I./.. -pthread -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-variable -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-error=3Dmaybe-uninitialized -Wno-mismatched-tags -Wsuggest-override -Wimplicit-fallthrough=3D3 -Wduplicated-cond -Wshadow=3Dlocal -Wdeprecated-copy -Wdeprecated-copy-dtor -Wredundant-move -Wmissing-declarations -Wstrict-null-sentinel -Wformat -Wformat-nonliteral -Werror -g -O2 -c -o infcall.o -MT infcall.o -MMD -= MP -MF ./.deps/infcall.Tpo infcall.c In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/hashtable_policy.h= :36, from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/hashtable.h:35, from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/unordered_map.h:33, from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/unordered_map:41, from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/functional:63, from ./../gdbsupport/ptid.h:35, from ./../gdbsupport/common-defs.h:206, from defs.h:26, from infcall.c:20: In static member function =E2=80=98static _Up* std::__copy_move<_IsMove, tr= ue, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp =3D value*; _Up =3D value*; bool _IsMove =3D false]=E2=80=99, inlined from =E2=80=98_OI std::__copy_move_a2(_II, _II, _OI) [with bool= _IsMove =3D false; _II =3D value**; _OI =3D value**]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_algobase.h:506= :30, inlined from =E2=80=98_OI std::__copy_move_a1(_II, _II, _OI) [with bool= _IsMove =3D false; _II =3D value**; _OI =3D value**]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_algobase.h:533= :42, inlined from =E2=80=98_OI std::__copy_move_a(_II, _II, _OI) [with bool = _IsMove =3D false; _II =3D value**; _OI =3D value**]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_algobase.h:540= :31, inlined from =E2=80=98_OI std::copy(_II, _II, _OI) [with _II =3D value*= *; _OI =3D value**]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_algobase.h:633= :7, inlined from =E2=80=98static _ForwardIterator std::__uninitialized_copy::__uninit_copy(_InputIterator, _InputIterat= or, _ForwardIterator) [with _InputIterator =3D value**; _ForwardIterator =3D va= lue**]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_uninitialized.= h:147:27, inlined from =E2=80=98_ForwardIterator std::uninitialized_copy(_InputIt= erator, _InputIterator, _ForwardIterator) [with _InputIterator =3D value**; _ForwardIterator =3D value**]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_uninitialized.= h:185:15, inlined from =E2=80=98_ForwardIterator std::__uninitialized_copy_a(_Inp= utIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator =3D value**; _ForwardIterator =3D value**; _Tp =3D value*]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_uninitialized.= h:373:37, inlined from =E2=80=98void std::vector<_Tp, _Alloc>::_M_range_insert(it= erator, _ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator =3D value**; _Tp =3D value*; _Alloc =3D std::allocator]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/vector.tcc:814:38, inlined from =E2=80=98std::vector<_Tp, _Alloc>::iterator std::vector<_T= p, _Alloc>::insert(const_iterator, _InputIterator, _InputIterator) [with _InputIterator =3D value**; =3D void; _Tp =3D valu= e*; _Alloc =3D std::allocator]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_vector.h:1483:= 19, inlined from =E2=80=98value* call_function_by_hand_dummy(value*, type*, gdb::array_view, void (*)(void*, int), void*)=E2=80=99 at infcall.c= :1239:23: /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_algobase.h:437= :30: error: =E2=80=98void* __builtin_memmove(void*, const void*, long unsigned i= nt)=E2=80=99 writing between 9 and 9223372036854775800 bytes into a region of size 0 overflows t= he destination [-Werror=3Dstringop-overflow=3D] 437 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num= ); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/x86_64-pc-linux-gnu/bit= s/c++allocator.h:33, from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/allocator.h:46, from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/alloc_traits.h:39, from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/ext/alloc_traits.h:34, from /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/hashtable_policy.h= :39: In member function =E2=80=98_Tp* std::__new_allocator<_Tp>::allocate(size_t= ype, const void*) [with _Tp =3D value*]=E2=80=99, inlined from =E2=80=98static _Tp* std::allocator_traits >::allocate(allocator_type&, size_type) [with _Tp =3D value*]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/alloc_traits.h:482= :28, inlined from =E2=80=98std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp =3D valu= e*; _Alloc =3D std::allocator]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_vector.h:378:3= 3, inlined from =E2=80=98std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp =3D valu= e*; _Alloc =3D std::allocator]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_vector.h:375:7, inlined from =E2=80=98void std::vector<_Tp, _Alloc>::_M_range_insert(it= erator, _ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator =3D value**; _Tp =3D value*; _Alloc =3D std::allocator]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/vector.tcc:805:40, inlined from =E2=80=98std::vector<_Tp, _Alloc>::iterator std::vector<_T= p, _Alloc>::insert(const_iterator, _InputIterator, _InputIterator) [with _InputIterator =3D value**; =3D void; _Tp =3D valu= e*; _Alloc =3D std::allocator]=E2=80=99 at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/stl_vector.h:1483:= 19, inlined from =E2=80=98value* call_function_by_hand_dummy(value*, type*, gdb::array_view, void (*)(void*, int), void*)=E2=80=99 at infcall.c= :1239:23: /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/new_allocator.h:14= 7:55: note: at offset [-9223372036854775808, -1] into destination object of size = [8, 9223372036854775800] allocated by =E2=80=98operator new=E2=80=99 147 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp))); | ^ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:1924: infcall.o] Error 1 make[2]: Leaving directory '/home/sam/git/binutils-gdb/gdb' make[1]: *** [Makefile:13766: all-gdb] Error 2 make[1]: Leaving directory '/home/sam/git/binutils-gdb' make: *** [Makefile:1021: all] Error 2 ``` --=20 You are receiving this mail because: You are on the CC list for the bug.=