public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/92815] [8/9/10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct
[not found] <bug-92815-4@http.gcc.gnu.org/bugzilla/>
@ 2020-04-22 21:38 ` msebor at gcc dot gnu.org
2020-05-18 21:25 ` [Bug middle-end/92815] [8/9/10/11 " cvs-commit at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-04-22 21:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2019-12-05 00:00:00 |2020-4-22
Known to fail| |10.0, 8.2.0, 9.2.0
Keywords| |patch
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-April/544369.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/92815] [8/9/10/11 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct
[not found] <bug-92815-4@http.gcc.gnu.org/bugzilla/>
2020-04-22 21:38 ` [Bug middle-end/92815] [8/9/10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct msebor at gcc dot gnu.org
@ 2020-05-18 21:25 ` cvs-commit at gcc dot gnu.org
2020-05-18 21:26 ` [Bug middle-end/92815] [8/9/10 " msebor at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-18 21:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:
https://gcc.gnu.org/g:7a41fcde6c67faafab8c8ee2a31140999383dcef
commit r11-470-g7a41fcde6c67faafab8c8ee2a31140999383dcef
Author: Martin Sebor <msebor@redhat.com>
Date: Mon May 18 15:24:12 2020 -0600
PR middle-end/92815 - spurious -Wstringop-overflow writing into a flexible
array of an extern struct
gcc/ChangeLog:
PR middle-end/92815
* tree-object-size.c (decl_init_size): New function.
(addr_object_size): Call it.
* tree.h (last_field): Declare.
(first_field): Add attribute nonnull.
gcc/testsuite/ChangeLog:
PR middle-end/92815
* gcc.dg/Warray-bounds-56.c: Remove xfails.
* gcc.dg/builtin-object-size-20.c: New test.
* gcc.dg/builtin-object-size-21.c: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/92815] [8/9/10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct
[not found] <bug-92815-4@http.gcc.gnu.org/bugzilla/>
2020-04-22 21:38 ` [Bug middle-end/92815] [8/9/10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct msebor at gcc dot gnu.org
2020-05-18 21:25 ` [Bug middle-end/92815] [8/9/10/11 " cvs-commit at gcc dot gnu.org
@ 2020-05-18 21:26 ` msebor at gcc dot gnu.org
2020-05-18 22:33 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-05-18 21:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.0
Summary|[8/9/10/11 Regression] |[8/9/10 Regression]
|spurious |spurious
|-Wstringop-overflow writing |-Wstringop-overflow writing
|into a flexible array of an |into a flexible array of an
|extern struct |extern struct
--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
Fixed on trunk for now.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/92815] [8/9/10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct
[not found] <bug-92815-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-05-18 21:26 ` [Bug middle-end/92815] [8/9/10 " msebor at gcc dot gnu.org
@ 2020-05-18 22:33 ` cvs-commit at gcc dot gnu.org
2020-05-25 15:44 ` asolokha at gmx dot com
` (5 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-18 22:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:
https://gcc.gnu.org/g:8edf0adb6616bd717312d9b305c7d7c9a6b7a171
commit r11-472-g8edf0adb6616bd717312d9b305c7d7c9a6b7a171
Author: Martin Sebor <msebor@redhat.com>
Date: Mon May 18 16:31:13 2020 -0600
PR middle-end/92815 - spurious -Wstringop-overflow writing into a flexible
array of an extern struct
Adjust test to avoid failures in ILP32 mode.
gcc/testsuite/ChangeLog:
PR middle-end/92815
* gcc.dg/builtin-object-size-20.c: Adjust to avoid failures in
ILP32 mode.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/92815] [8/9/10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct
[not found] <bug-92815-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2020-05-18 22:33 ` cvs-commit at gcc dot gnu.org
@ 2020-05-25 15:44 ` asolokha at gmx dot com
2021-05-14 9:52 ` [Bug middle-end/92815] [9/10 " jakub at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: asolokha at gmx dot com @ 2020-05-25 15:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815
Arseny Solokha <asolokha at gmx dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |asolokha at gmx dot com
--- Comment #9 from Arseny Solokha <asolokha at gmx dot com> ---
Created attachment 48593
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48593&action=edit
Diff between assembler output produced by gcc and g++ 11
Though there are no flexible array members in C++, is it expected for g++ to
behave differently w/ this testcase?
While compiling it w/ gcc yeilds the following, which is expected:
% gcc-11.0.0 -c gcc/testsuite/gcc.dg/builtin-object-size-21.c
gcc/testsuite/gcc.dg/builtin-object-size-21.c:29:14: error: size of variable
'xm3_4' is too large
29 | struct Ax_m3 xm3_4 = { { 0 }, { 1, 2, 3, 3 } }; // { dg-error "too
large" }
| ^~~~~
gcc/testsuite/gcc.dg/builtin-object-size-21.c:43:14: error: size of variable
'xmx_1' is too large
43 | struct Ax_mx xmx_1 = { { 0 }, { 1 } }; // { dg-error "too
large" }
|
W/ g++ I have
% g++-11.0.0 -c gcc/testsuite/gcc.dg/builtin-object-size-21.c
/tmp/ccPBumhF.s: Assembler messages:
/tmp/ccPBumhF.s: Fatal error: can't write 14 bytes to section .text of
/tmp/ccj6lymE.o: 'file truncated'
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.0.0/../../../../x86_64-unknown-linux-gnu/bin/as:
BFD (Gentoo 2.34 p4) 2.34.0 assertion fail
/var/tmp/portage/sys-devel/binutils-2.34-r1/work/binutils-2.34/bfd/elf.c:3169
/tmp/ccPBumhF.s: Fatal error: can't close /tmp/ccj6lymE.o: file truncated
because of
[pid 1165642] openat(AT_FDCWD, "builtin-object-size-21.o",
O_RDWR|O_CREAT|O_TRUNC, 0666) = 3
<…>
[pid 1165642] fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
[pid 1165642] lseek(3, -9223372036854775808, SEEK_SET) = -1 EINVAL (Invalid
argument)
Or, when writing to an "endless" file w/ -o /dev/null:
[pid 1164514] lseek(3, -9223372036854775808, SEEK_SET) = 0
[pid 1164514] read(3, "", 640) = 0
[pid 1164514] lseek(3, 640, SEEK_CUR) = 0
[pid 1164514] write(3, "\0builtin-object-size-21.c\0xm3_0\0"..., 96) = 96
[pid 1164514] lseek(3, 0, SEEK_SET) = 0
[pid 1164514] read(3, "", 4096) = 0
[pid 1164514] lseek(3, 64, SEEK_CUR) = 0
[pid 1164514] write(3, "UH\211\345\220]\303UH\211\345\220]\303", 14) = 14
[pid 1164514] lseek(3, 0, SEEK_SET) = 0
[pid 1164514] read(3, "", 4096) = 0
[pid 1164514] lseek(3, 96, SEEK_CUR) = 0
[pid 1164514] write(3,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4096
[pid 1164514] write(3,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4096
[pid 1164514] write(3,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4096
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/92815] [9/10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct
[not found] <bug-92815-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2020-05-25 15:44 ` asolokha at gmx dot com
@ 2021-05-14 9:52 ` jakub at gcc dot gnu.org
2021-06-01 8:15 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14 9:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|8.5 |9.4
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/92815] [9/10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct
[not found] <bug-92815-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2021-05-14 9:52 ` [Bug middle-end/92815] [9/10 " jakub at gcc dot gnu.org
@ 2021-06-01 8:15 ` rguenth at gcc dot gnu.org
2022-05-27 9:41 ` [Bug middle-end/92815] [10 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/92815] [10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct
[not found] <bug-92815-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2021-06-01 8:15 ` rguenth at gcc dot gnu.org
@ 2022-05-27 9:41 ` rguenth at gcc dot gnu.org
2022-06-28 10:39 ` jakub at gcc dot gnu.org
2023-07-07 8:45 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/92815] [10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct
[not found] <bug-92815-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2022-05-27 9:41 ` [Bug middle-end/92815] [10 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:39 ` jakub at gcc dot gnu.org
2023-07-07 8:45 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/92815] [10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct
[not found] <bug-92815-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2022-06-28 10:39 ` jakub at gcc dot gnu.org
@ 2023-07-07 8:45 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 8:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.0
Resolution|--- |FIXED
Status|NEW |RESOLVED
Known to fail| |10.5.0
--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 11.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-07-07 8:45 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-92815-4@http.gcc.gnu.org/bugzilla/>
2020-04-22 21:38 ` [Bug middle-end/92815] [8/9/10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct msebor at gcc dot gnu.org
2020-05-18 21:25 ` [Bug middle-end/92815] [8/9/10/11 " cvs-commit at gcc dot gnu.org
2020-05-18 21:26 ` [Bug middle-end/92815] [8/9/10 " msebor at gcc dot gnu.org
2020-05-18 22:33 ` cvs-commit at gcc dot gnu.org
2020-05-25 15:44 ` asolokha at gmx dot com
2021-05-14 9:52 ` [Bug middle-end/92815] [9/10 " jakub at gcc dot gnu.org
2021-06-01 8:15 ` rguenth at gcc dot gnu.org
2022-05-27 9:41 ` [Bug middle-end/92815] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:39 ` jakub at gcc dot gnu.org
2023-07-07 8:45 ` rguenth at gcc dot gnu.org
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).