[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-ov
From: |
Philippe Mathieu-Daudé |
Subject: |
s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] |
Date: |
Thu, 22 Apr 2021 06:18:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
Hi Thomas, Daniel, Stefano,
Regarding the following warning (GCC 11 on Fedora 34):
In file included from pc-bios/s390-ccw/main.c:11:
In function ‘memset’,
inlined from ‘boot_setup’ at pc-bios/s390-ccw/main.c:185:5,
inlined from ‘main’ at pc-bios/s390-ccw/main.c:288:5:
pc-bios/s390-ccw/libc.h:28:14: warning: writing 1 byte into a region of
size 0 [-Wstringop-overflow=]
28 | p[i] = c;
| ~~~~~^~~
Daniel were right on IRC:
danpb: it is from a call memset((char *)S390EP, 0, 6) where S390EP
is just a constant address 0x10008
danpb: the compiler doesn't now how big that is, so it seems to assume
it is zero length
This is a known GCC issue:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578
"gcc-11 -Warray-bounds or -Wstringop-overread warning when accessing a
pointer from integer literal"
Regards,
Phil.
- s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=],
Philippe Mathieu-Daudé <=
- Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=], Thomas Huth, 2021/04/22
- Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=], Christian Borntraeger, 2021/04/22
- Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=], Daniel P . Berrangé, 2021/04/22
- Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=], Peter Maydell, 2021/04/22
- Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=], Philippe Mathieu-Daudé, 2021/04/22
- Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=], Thomas Huth, 2021/04/22
- Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=], Christian Borntraeger, 2021/04/22
- Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=], Philippe Mathieu-Daudé, 2021/04/22
- Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=], Thomas Huth, 2021/04/22
- Re: s390-ccw: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=], Philippe Mathieu-Daudé, 2021/04/22