Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 882711 - x11-base/xorg-server-21.1.4 - inlined from 'list_test' at ../xorg-server-21.1.4/test/list.c:383:5: ../xorg-server-21.1.4/include/list.h:311:10: error: array subscript 0 is outside array bounds of 'struct parent[1]' [-Werror=array-bounds]
Summary: x11-base/xorg-server-21.1.4 - inlined from 'list_test' at ../xorg-server-21.1...
Status: RESOLVED DUPLICATE of bug 835653
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 882709 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-11-24 11:13 UTC by ernsteiswuerfel
Modified: 2022-11-24 11:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (x86, GCC - failed) (xorg-server-21.1.4:20221124-014807.log.xz,20.98 KB, application/x-xz)
2022-11-24 11:14 UTC, ernsteiswuerfel
Details
build.log.xz (x86, Clang - succeeded) (xorg-server-21.1.4:20221124-015301.log.xz,23.96 KB, application/x-xz)
2022-11-24 11:15 UTC, ernsteiswuerfel
Details
emerge --info (file_882711.txt,6.37 KB, text/plain)
2022-11-24 11:15 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2022-11-24 11:13:59 UTC
Fails to build with gcc-12.2.1_p20221008 but interestingly succeeds building with clang-15.0.3:

[...]
FAILED: test/tests.p/list.c.o 
i686-pc-linux-gnu-gcc -Itest/tests.p -Itest -I../xorg-server-21.1.4/test -IXext -I../xorg-server-21.1.4/Xext -IXi -I../xorg-server-21.1.4/Xi -Icomposite -I../xorg-server-21.1.4/composite -Idamageext -I../xorg-server-21.1.4/damageext -Iexa -I../xorg-server-21.1.4/exa -Ifb -I../xorg-server-21.1.4/fb -Iglamor -I../xorg-server-21.1.4/glamor -Imi -I../xorg-server-21.1.4/mi -Imiext/damage -I../xorg-server-21.1.4/miext/damage -Imiext/shadow -I../xorg-server-21.1.4/miext/shadow -Imiext/sync -I../xorg-server-21.1.4/miext/sync -Idbe -I../xorg-server-21.1.4/dbe -Idri3 -I../xorg-server-21.1.4/dri3 -Iinclude -I../xorg-server-21.1.4/include -Ipresent -I../xorg-server-21.1.4/present -Irandr -I../xorg-server-21.1.4/randr -Irender -I../xorg-server-21.1.4/render -Ixfixes -I../xorg-server-21.1.4/xfixes -Ihw/xfree86/common -I../xorg-server-21.1.4/hw/xfree86/common -Ihw/xfree86/ddc -I../xorg-server-21.1.4/hw/xfree86/ddc -Ihw/xfree86/dri2 -I../xorg-server-21.1.4/hw/xfree86/dri2 -Ihw/xfree86/i2c -I../xorg-server-21.1.4/hw/xfree86/i2c -Ihw/xfree86/int10 -I../xorg-server-21.1.4/hw/xfree86/int10 -Ihw/xfree86/loader -I../xorg-server-21.1.4/hw/xfree86/loader -Ihw/xfree86/modes -I../xorg-server-21.1.4/hw/xfree86/modes -Ihw/xfree86/os-support -I../xorg-server-21.1.4/hw/xfree86/os-support -I../xorg-server-21.1.4/hw/xfree86/os-support/bus -Ihw/xfree86/parser -I../xorg-server-21.1.4/hw/xfree86/parser -Ihw/xfree86/ramdac -I../xorg-server-21.1.4/hw/xfree86/ramdac -Ihw/xfree86/vgahw -I../xorg-server-21.1.4/hw/xfree86/vgahw -I../xorg-server-21.1.4/test/xi1 -I../xorg-server-21.1.4/test/xi2 -I/usr/include/pixman-1 -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O0 -DHAVE_DIX_CONFIG_H -fno-strict-aliasing -fvisibility=hidden -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Os -march=pentium4 -mtune=pentium4 -pipe -DXORG_TESTS -DRES_TESTS -fno-lto -MD -MQ test/tests.p/list.c.o -MF test/tests.p/list.c.o.d -o test/tests.p/list.c.o -c ../xorg-server-21.1.4/test/list.c
In file included from ../xorg-server-21.1.4/test/list.c:32:
In function 'test_xorg_list_for_each',
    inlined from 'list_test' at ../xorg-server-21.1.4/test/list.c:383:5:
../xorg-server-21.1.4/include/list.h:311:10: error: array subscript 0 is outside array bounds of 'struct parent[1]' [-Werror=array-bounds]
  311 |          &pos->member != (head);                                        \
../xorg-server-21.1.4/test/list.c:213:5: note: in expansion of macro 'xorg_list_for_each_entry'
  213 |     xorg_list_for_each_entry(c, &parent.children, node) {
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
../xorg-server-21.1.4/test/list.c: In function 'list_test':
../xorg-server-21.1.4/test/list.c:193:19: note: at offset -4 into object 'parent' of size 16
  193 |     struct parent parent = { 0 };
      |                   ^~~~~~
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.
 * ERROR: x11-base/xorg-server-21.1.4::gentoo failed (compile phase):


Building was done in a x86 partition on a Ryzen 5950X with setarch i686.
Comment 1 ernsteiswuerfel archtester 2022-11-24 11:14:44 UTC
Created attachment 836309 [details]
build.log.xz (x86, GCC - failed)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-24 11:15:16 UTC
*** Bug 882709 has been marked as a duplicate of this bug. ***
Comment 3 ernsteiswuerfel archtester 2022-11-24 11:15:25 UTC
Created attachment 836311 [details]
build.log.xz (x86, Clang - succeeded)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-24 11:15:48 UTC
It's -Os!

*** This bug has been marked as a duplicate of bug 835653 ***
Comment 5 ernsteiswuerfel archtester 2022-11-24 11:15:51 UTC
Created attachment 836313 [details]
emerge --info
Comment 6 ernsteiswuerfel archtester 2022-11-24 11:22:00 UTC
(In reply to Sam James from comment #4)
> It's -Os!
Oh, sorry! Thought I had updated my make.conf for that reason. But seems I have not...
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-24 11:23:25 UTC
(In reply to ernsteiswuerfel from comment #6)
> (In reply to Sam James from comment #4)
> > It's -Os!
> Oh, sorry! Thought I had updated my make.conf for that reason. But seems I
> have not...

No worries! I'm going to add a replace in the ebuild now too