From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 74E37385B51E; Fri, 17 Mar 2023 14:52:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74E37385B51E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679064725; bh=RZM/hPdETfCQjMDqQstisOGCn4EziYUH4mUJ7kDMEOs=; h=From:To:Subject:Date:From; b=yLb6+EQpS6hgN2egu/cyMUFZRCSB5pSc7TDlTl2rlAyi22kIIp/puhAIaKu9JreV7 9p79wrQKaf8rlo0rhpGnuf78rdzQLJ/3m3pSxO7bMo65U/gOdbRS52c10KhOz8YpGh ZJ1gfV5Hg1yCVVdSJirHlSGpaZe7MLtV+qVnxmMo= From: "malat at debian dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109175] New: error: 'void* __builtin_memset(void*, int, long unsigned int)' writing 4 or more bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] Date: Fri, 17 Mar 2023 14:52:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: malat at debian dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.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://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109175 Bug ID: 109175 Summary: error: 'void* __builtin_memset(void*, int, long unsigned int)' writing 4 or more bytes into a region of size 0 overflows the destination [-Werror=3Dstringop-overflow=3D] Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: malat at debian dot org Target Milestone: --- A new warning is appearing in the highway compilation logs on aarch64: [...] FAILED: CMakeFiles/convert_test.dir/hwy/tests/convert_test.cc.o=20 /usr/lib/gcc-snapshot/bin/g++ -DHWY_SHARED_DEFINE -I"/<>" -g -= O2 -ffile-prefix-map=3D/<>=3D. -fstack-protector-strong -Wformat -Werror=3Dformat-security -DHWY_BROKEN_EMU128=3D0 -Wdate-time -D_FORTIFY_SO= URCE=3D2 -fPIE -fvisibility=3Dhidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -D__DATE__=3D\"redacted\" -D__TIMESTAMP__=3D\"redacted\" -D__TIME__=3D\"redacted\" -fmerge-all-consta= nts -Wall -Wextra -Wconversion -Wsign-conversion -Wvla -Wnon-virtual-dtor -fmath-errno -fno-exceptions -Werror -DHWY_IS_TEST=3D1 -DGTEST_HAS_PTHREAD= =3D1 -MD -MT CMakeFiles/convert_test.dir/hwy/tests/convert_test.cc.o -MF CMakeFiles/convert_test.dir/hwy/tests/convert_test.cc.o.d -o CMakeFiles/convert_test.dir/hwy/tests/convert_test.cc.o -c '/<>/hwy/tests/convert_test.cc' In file included from /<>/hwy/foreach_target.h:114, from /<>/hwy/tests/convert_test.cc:26: In function 'hwy::AlignedFreeUniquePtr hwy::N_SVE2::F16TestCases(= D, size_t&) [with D =3D Simd]', inlined from 'void hwy::N_SVE2::TestF16::operator()(TF32, DF32) [with T= F32 =3D float; DF32 =3D hwy::N_SVE2::Simd]' at /<>/hwy/tests/convert_test.cc:300:10: /<>/hwy/tests/convert_test.cc:288:11: error: 'void* __builtin_memset(void*, int, long unsigned int)' writing 4 or more bytes in= to a region of size 0 overflows the destination [-Werror=3Dstringop-overflow=3D] 288 | in[i] =3D 0.0f; In function 'void hwy::N_SVE2::TestF16::operator()(TF32, DF32) [with TF32 = =3D float; DF32 =3D hwy::N_SVE2::Simd]': cc1plus: note: destination object is likely at address zero In file included from /<>/hwy/foreach_target.h:103: In function 'hwy::AlignedFreeUniquePtr hwy::N_SVE::F16TestCases(D, size_t&) [with D =3D Simd]', inlined from 'void hwy::N_SVE::TestF16::operator()(TF32, DF32) [with TF= 32 =3D float; DF32 =3D hwy::N_SVE::Simd]' at /<>/hwy/tests/convert_test.cc:300:10: /<>/hwy/tests/convert_test.cc:288:11: error: 'void* __builtin_memset(void*, int, long unsigned int)' writing 4 or more bytes in= to a region of size 0 overflows the destination [-Werror=3Dstringop-overflow=3D] 288 | in[i] =3D 0.0f; In function 'void hwy::N_SVE::TestF16::operator()(TF32, DF32) [with TF32 =3D float; DF32 =3D hwy::N_SVE::Simd]': cc1plus: note: destination object is likely at address zero cc1plus: all warnings being treated as errors [...] ref: * https://buildd.debian.org/status/fetch.php?pkg=3Dhighway&arch=3Darm64&ver= =3D1.0.4%7Egit20230308.a1d7764-1&stamp=3D1679052435&raw=3D0=