public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "malat at debian dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/109175] 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 15:04:02 +0000	[thread overview]
Message-ID: <bug-109175-4-SDv0ISRFyd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109175-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Mathieu Malaterre <malat at debian dot org> ---
Compiling the preprocessed source:

% /usr/lib/gcc-snapshot/bin/g++ --verbose -g  -fstack-protector-strong -Wformat
-Werror=format-security -DHWY_BROKEN_EMU128=0 -Wdate-time -D_FORTIFY_SOURCE=2
-fPIE -fvisibility=hidden -fvisibility-inlines-hid
den -Wno-builtin-macro-redefined -fmerge-all-constants -Wall -Wextra
-Wconversion -Wsign-conversion -Wvla -Wnon-virtual-dtor -fmath-errno
-fno-exceptions -Werror -DHWY_IS_TEST=1 -O2 -c 13/convert_test.cc.ii
Using built-in specs.
COLLECT_GCC=/usr/lib/gcc-snapshot/bin/g++
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 20230315-1'
--with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust
--prefix=/usr/lib/gcc-snapshot --with-gcc-major-version-only --program-prefix=
--enable-shared --enable-linker-build-id --disable-nls --enable-bootstrap
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libquadmath --disable-libquadmath-support --enable-plugin
--with-system-zlib --enable-libphobos-checking=release
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch
--enable-fix-cortex-a53-843419 --disable-werror --enable-checking=yes,extra,rtl
--build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
--with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.1 20230315 (experimental) [master r13-6680-ga9ae16db8cb]
(Debian 20230315-1)
COLLECT_GCC_OPTIONS='-v' '-g' '-fstack-protector-strong' '-Wformat=1'
'-Werror=format-security' '-D' 'HWY_BROKEN_EMU128=0' '-Wdate-time' '-D'
'_FORTIFY_SOURCE=2' '-fPIE' '-fvisibility=hidden' '-fvisibility-inlines-hidden'
'-Wno-builtin-macro-redefined' '-fmerge-all-constants' '-Wall' '-Wextra'
'-Wconversion' '-Wsign-conversion' '-Wvla' '-Wnon-virtual-dtor' '-fmath-errno'
'-fno-exceptions' '-Werror' '-D' 'HWY_IS_TEST=1' '-O2' '-c' '-shared-libgcc'
'-mlittle-endian' '-mabi=lp64'
 /usr/lib/gcc-snapshot/libexec/gcc/aarch64-linux-gnu/13/cc1plus -fpreprocessed
13/convert_test.cc.ii -quiet -dumpbase convert_test.cc.ii -dumpbase-ext .ii
-mlittle-endian -mabi=lp64 -g -O2 -Wformat=1 -Werror=format-security
-Wdate-time -Wno-builtin-macro-redefined -Wall -Wextra -Wconversion
-Wsign-conversion -Wvla -Wnon-virtual-dtor -Werror -version
-fstack-protector-strong -fPIE -fvisibility=hidden -fvisibility-inlines-hidden
-fmerge-all-constants -fmath-errno -fno-exceptions -o /tmp/ccjFMyE5.s
GNU C++17 (Debian 20230315-1) version 13.0.1 20230315 (experimental) [master
r13-6680-ga9ae16db8cb] (aarch64-linux-gnu)
        compiled by GNU C version 13.0.1 20230315 (experimental) [master
r13-6680-ga9ae16db8cb], GMP version 6.2.1, MPFR version 4.2.0, MPC version
1.3.1, isl version isl-0.25-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 4bc54a683351612d262139a66d85dce2
In file included from
/home/malat/highway-1.0.4~git20230308.a1d7764/hwy/foreach_target.h:114,
                 from
/home/malat/highway-1.0.4~git20230308.a1d7764/hwy/tests/convert_test.cc:26:
In function 'hwy::AlignedFreeUniquePtr<float []> hwy::N_SVE2::F16TestCases(D,
size_t&) [with D = Simd<float, 64, 0>]',
    inlined from 'void hwy::N_SVE2::TestF16::operator()(TF32, DF32) [with TF32
= float; DF32 = hwy::N_SVE2::Simd<float, 64, 0>]' at
/home/malat/highway-1.0.4~git20230308.a1d7764/hwy/tests/convert_test.cc:300:10:
/home/malat/highway-1.0.4~git20230308.a1d7764/hwy/tests/convert_test.cc:288:11:
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=]
  288 |     in[i] = 0.0f;
In function 'void hwy::N_SVE2::TestF16::operator()(TF32, DF32) [with TF32 =
float; DF32 = hwy::N_SVE2::Simd<float, 64, 0>]':
cc1plus: note: destination object is likely at address zero
In file included from
/home/malat/highway-1.0.4~git20230308.a1d7764/hwy/foreach_target.h:103:
In function 'hwy::AlignedFreeUniquePtr<float []> hwy::N_SVE::F16TestCases(D,
size_t&) [with D = Simd<float, 64, 0>]',
    inlined from 'void hwy::N_SVE::TestF16::operator()(TF32, DF32) [with TF32 =
float; DF32 = hwy::N_SVE::Simd<float, 64, 0>]' at
/home/malat/highway-1.0.4~git20230308.a1d7764/hwy/tests/convert_test.cc:300:10:
/home/malat/highway-1.0.4~git20230308.a1d7764/hwy/tests/convert_test.cc:288:11:
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=]
  288 |     in[i] = 0.0f;
In function 'void hwy::N_SVE::TestF16::operator()(TF32, DF32) [with TF32 =
float; DF32 = hwy::N_SVE::Simd<float, 64, 0>]':
cc1plus: note: destination object is likely at address zero

  parent reply	other threads:[~2023-03-17 15:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 14:52 [Bug c++/109175] New: " malat at debian dot org
2023-03-17 14:54 ` [Bug c++/109175] " malat at debian dot org
2023-03-17 14:55 ` malat at debian dot org
2023-03-17 15:04 ` malat at debian dot org [this message]
2023-03-20 19:50 ` [Bug tree-optimization/109175] " pinskia at gcc dot gnu.org
2023-03-24 18:20 ` malat at debian dot org
2023-03-24 18:46 ` pinskia at gcc dot gnu.org
2023-03-24 19:44 ` jan.wassenberg at gmail dot com
2023-09-26 11:59 ` malat at debian dot 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-109175-4-SDv0ISRFyd@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: link
Be 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).