Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 885501 - >=sys-devel/gcc-12.2.1_p20221203: segfaults when building on musl (/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/shared-object.mk:36: e500crtrest64gpr_s.o Segmentation fault)
Summary: >=sys-devel/gcc-12.2.1_p20221203: segfaults when building on musl (/var/tmp/p...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard: Happens with make-4.3, not make 4.4; ...
Keywords: PMASKED
Depends on:
Blocks: gcc-12 879193 888475
  Show dependency tree
 
Reported: 2022-12-11 22:23 UTC by ernsteiswuerfel
Modified: 2023-01-24 10:25 UTC (History)
4 users (show)

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


Attachments
build.log.xz (gcc-12.2.1_p20221210:20221211-210052.log.xz,42.35 KB, application/x-xz)
2022-12-11 22:23 UTC, ernsteiswuerfel
Details
emerge --info (file_885501.txt,7.11 KB, text/plain)
2022-12-11 22:24 UTC, ernsteiswuerfel
Details
segfault sys-devel-gcc-12.2.1_p20221210 (amd64, musl, -march=core2) (sys-devel-gcc-12.2.1_p20221210.log.xz,42.34 KB, application/x-xz)
2022-12-12 07:33 UTC, David Duchesne
Details
build.log.xz (ppc64, 12.2.1_p20221210) - successful build with MAKEOPTS="-j1" (gcc-12.2.1_p20221210:20221212-021035.log.xz,165.28 KB, application/x-xz)
2022-12-12 09:48 UTC, ernsteiswuerfel
Details
build.log (ppc64, 12.2.1_p20221210) - build with 12.2.1_p20221210 (gcc-12.2.1_p20221210:20221212-100641.log,104.73 KB, text/plain)
2022-12-12 17:18 UTC, ernsteiswuerfel
Details
gcc-build-logs.tar.xz (ppc64, 12.2.1_p20221210) - build with 12.2.1_p20221210 (gcc-build-logs.tar.xz,40.15 KB, application/x-xz)
2022-12-12 17:18 UTC, ernsteiswuerfel
Details
build.log.xz (ppc64, 12.2.1_p20221203) - build w. 12.2.1_p20221126 (gcc-12.2.1_p20221203:20221214-012104.log.xz,42.60 KB, application/x-xz)
2022-12-14 01:41 UTC, ernsteiswuerfel
Details
all 10 segfaults on amd64 with -j12 (segfaults-amd64-j12,20.22 KB, text/plain)
2023-01-02 08:54 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2022-12-11 22:23:32 UTC
Created attachment 841583 [details]
build.log.xz

[...]
/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/build/./gcc/ -B/usr/powerpc64-gentoo-linux-musl/bin/ -B/usr/powerpc64-gentoo-linux-musl/lib/ -isystem /usr/powerpc64-gentoo-linux-musl/include -isystem /usr/powerpc64-gentoo-linux-musl/sys-include   -fno-checking -g -mcpu=970 -mtune=970 -pipe -O2 -O2  -g -mcpu=970 -mtune=970 -pipe -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -mlong-double-128 -mno-minimal-toc -DGTHREAD_USE_WEAK=0 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fno-stack-clash-protection  -fPIC -mlong-double-128 -mno-minimal-toc -DGTHREAD_USE_WEAK=0 -I. -I. -I../.././gcc -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/. -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/../gcc -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/../include -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/../libdecnumber/dpd -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/../libdecnumber -DHAVE_CC_TLS   -o e500crtrest64gpr_s.o -MT e500crtrest64gpr_s.o -MD -MP -MF e500crtrest64gpr_s.dep -DSHARED -mno-gnu-attribute -c -xassembler-with-cpp /var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/config/rs6000/e500crtrest64gpr.S
make[3]: *** [/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/shared-object.mk:36: e500crtrest64gpr_s.o] Segmentation fault
make[3]: Leaving directory '/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/build/powerpc64-gentoo-linux-musl/libgcc'
make[3]: *** Deleting file 'e500crtresx32gpr_s.o'
make[3]: Entering directory '/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/build/powerpc64-gentoo-linux-musl/libgcc'
/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/build/./gcc/ -B/usr/powerpc64-gentoo-linux-musl/bin/ -B/usr/powerpc64-gentoo-linux-musl/lib/ -isystem /usr/powerpc64-gentoo-linux-musl/include -isystem /usr/powerpc64-gentoo-linux-musl/sys-include   -fno-checking -g -mcpu=970 -mtune=970 -pipe -O2 -O2  -g -mcpu=970 -mtune=970 -pipe -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -mlong-double-128 -mno-minimal-toc -DGTHREAD_USE_WEAK=0 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fno-stack-clash-protection  -fPIC -mlong-double-128 -mno-minimal-toc -DGTHREAD_USE_WEAK=0 -I. -I. -I../.././gcc -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/. -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/../gcc -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/../include -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/../libdecnumber/dpd -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/../libdecnumber -DHAVE_CC_TLS   -o e500crtresx32gpr_s.o -MT e500crtresx32gpr_s.o -MD -MP -MF e500crtresx32gpr_s.dep -DSHARED -mno-gnu-attribute -c -xassembler-with-cpp /var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/config/rs6000/e500crtresx32gpr.S
make[3]: *** [/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/gcc-12-20221210/libgcc/shared-object.mk:36: e500crtresx32gpr_s.o] Segmentation fault
make[3]: Leaving directory '/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/build/powerpc64-gentoo-linux-musl/libgcc'
make[2]: *** [Makefile:19105: all-stage1-target-libgcc] Error 2
make[1]: *** [Makefile:24505: stage1-bubble] Error 2
make: *** [Makefile:24853: bootstrap-lean] Error 2
 * ERROR: sys-devel/gcc-12.2.1_p20221210::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2022-12-11 22:24:10 UTC
Created attachment 841585 [details]
emerge --info
Comment 2 David Duchesne 2022-12-12 07:33:32 UTC
Created attachment 841627 [details]
segfault sys-devel-gcc-12.2.1_p20221210 (amd64, musl, -march=core2)

Similar segfault on a musl box with amd64 (see log)
Comment 3 ernsteiswuerfel archtester 2022-12-12 09:48:05 UTC
Created attachment 841637 [details]
build.log.xz (ppc64, 12.2.1_p20221210) - successful build with MAKEOPTS="-j1"

Interestingly the build succeeded now as I passed MAKEOPTS="-j1"!

Also I can confirm this is on musl only. On glibc ppc64 the build went flawless.
Comment 4 ernsteiswuerfel archtester 2022-12-12 17:18:16 UTC
Created attachment 842113 [details]
build.log (ppc64, 12.2.1_p20221210) - build with 12.2.1_p20221210

After successfully building 12.2.1_p20221210 with MAKEOPTS="-j1" I tried building 12.2.1_p20221210 with itself.

This errors out even earlier at:

[...]
checking for sys/param.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... yes
checking for working strncmp... yes
configure: updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: executing default commands
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-12.2.1_p20221210/work/build'
make[1]: *** [Makefile:24505: stage1-bubble] Error 2
make: *** [Makefile:24853: bootstrap-lean] Error 2
 * ERROR: sys-devel/gcc-12.2.1_p20221210::gentoo failed (compile phase):
 *   emake failed

Here also building with MAKEOPTS="-j1" gets beyond that stage.

So definitely a musl & threading issue...
Comment 5 ernsteiswuerfel archtester 2022-12-12 17:18:58 UTC
Created attachment 842115 [details]
gcc-build-logs.tar.xz (ppc64, 12.2.1_p20221210) - build with 12.2.1_p20221210
Comment 6 David Duchesne 2022-12-13 21:16:53 UTC
(In reply to ernsteiswuerfel from comment #3)
> Also I can confirm this is on musl only. On glibc ppc64 the build went
> flawless.

Same here, glibc amd64 compile without issue. Only musl triggers the segfault.
Comment 7 ernsteiswuerfel archtester 2022-12-14 01:41:07 UTC
Created attachment 842515 [details]
build.log.xz (ppc64, 12.2.1_p20221203) - build w. 12.2.1_p20221126

As suggested by Sam I built up the the GCC 12 point releases having been in portage up to the point it failed.

My starting point was 12.2.1_p20221008 and I built up 4 releases up to gcc-12.2.1_p20221126. This was the last GCC 12 point release which built and is able to build it self. Building gcc-12.2.1_p20221203 with 12.2.1_p20221126 fails for me on musl ppc64 (log attached).
Comment 8 ernsteiswuerfel archtester 2022-12-14 01:42:59 UTC
(In reply to David Duchesne from comment #6)
> Same here, glibc amd64 compile without issue. Only musl triggers the
> segfault.
Thanks for checking out on amd64!
Comment 9 Larry the Git Cow gentoo-dev 2022-12-17 07:38:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a555121b7873420be8e4c1876169b22301c720bc

commit a555121b7873420be8e4c1876169b22301c720bc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-17 07:38:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-17 07:38:12 +0000

    profiles/features/musl: mask >=gcc-12.2.1_p20221203:12 (fails to compile, segfaults)
    
    Bug: https://bugs.gentoo.org/885501
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/features/musl/package.mask | 4 ++++
 1 file changed, 4 insertions(+)
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-17 08:47:17 UTC
Could you report your findings upstream?
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-17 08:47:32 UTC
(In reply to Sam James from comment #10)
> Could you report your findings upstream?

(or maybe ask in #musl on IRC first)
Comment 12 ernsteiswuerfel archtester 2022-12-19 09:56:38 UTC
(In reply to Sam James from comment #11)
> (In reply to Sam James from comment #10)
> > Could you report your findings upstream?
> 
> (or maybe ask in #musl on IRC first)
Didn't get much feedback on #musl so far...

Would I file this upstream as a gcc or a musl bug?
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-26 05:37:52 UTC
(In reply to ernsteiswuerfel from comment #12)
> (In reply to Sam James from comment #11)
> > (In reply to Sam James from comment #10)
> > > Could you report your findings upstream?
> > 
> > (or maybe ask in #musl on IRC first)
> Didn't get much feedback on #musl so far...
> 
> Would I file this upstream as a gcc or a musl bug?

gcc, I think.
Comment 14 tt_1 2022-12-30 12:43:57 UTC
Hi, I just noticed the mask on all gcc-12 snapshots in tree. Is there a clear regression window for this bug yet?
Comment 15 Larry the Git Cow gentoo-dev 2022-12-31 14:57:13 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82c68ba6bb3290b6b39e178d6840399752bacfbc

commit 82c68ba6bb3290b6b39e178d6840399752bacfbc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-31 14:56:18 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-31 14:56:47 +0000

    sys-devel/gcc: restore 12.2.1_p20221126 for musl
    
    Fixes: add25cd2d8789812e33791df51620b65aa9a53a8
    Bug: https://bugs.gentoo.org/885501
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest                    |  2 ++
 sys-devel/gcc/gcc-12.2.1_p20221126.ebuild | 52 +++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)
Comment 16 tt_1 2022-12-31 21:10:08 UTC
gcc-12 patchset is broken, with gcc-12-20221203 only patchset v2 and v3 are working, v4,5,6 are broken. Patchset v7 is working, but I believe thats because it has dropped make jobserver patches. 

gcc-12.2.1-20221224 is broken as well with patchlevel 7, because it has the make jobserver patches merged upstream. 

I'm unable to safely idenitify all those make jobserver commits to revert, sam can you please help me identify them?
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-31 21:11:14 UTC
(In reply to tt_1 from comment #16)
> gcc-12 patchset is broken, with gcc-12-20221203 only patchset v2 and v3 are
> working, v4,5,6 are broken. Patchset v7 is working, but I believe thats
> because it has dropped make jobserver patches. 
> 
> gcc-12.2.1-20221224 is broken as well with patchlevel 7, because it has the
> make jobserver patches merged upstream. 
> 
> I'm unable to safely idenitify all those make jobserver commits to revert,
> sam can you please help me identify them?

1. https://gcc.gnu.org/git?p=gcc.git;a=commit;h=c6a1f7e00cdf5b4ad533d698a93394a5bcfc9745
2. https://gcc.gnu.org/git?p=gcc.git;a=commit;h=e4b5fec75aa8d0d01f6e042ec2888ef92eaa932a
Comment 18 tt_1 2022-12-31 22:05:26 UTC
compile for gcc-12.2.1_p20221224 with -j12 is working now with those two patches reverted: 

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-gentoo-linux-musl/12/lto-wrapper
Target: x86_64-gentoo-linux-musl
Configured with: /var/tmp/portage/sys-devel/gcc-12.2.1_p20221224/work/gcc-12-20221224/configure --host=x86_64-gentoo-linux-musl --build=x86_64-gentoo-linux-musl --prefix=/usr --bindir=/usr/x86_64-gentoo-linux-musl/gcc-bin/12 --includedir=/usr/lib/gcc/x86_64-gentoo-linux-musl/12/include --datadir=/usr/share/gcc-data/x86_64-gentoo-linux-musl/12 --mandir=/usr/share/gcc-data/x86_64-gentoo-linux-musl/12/man --infodir=/usr/share/gcc-data/x86_64-gentoo-linux-musl/12/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-gentoo-linux-musl/12/include/g++-v12 --with-python-dir=/share/gcc-data/x86_64-gentoo-linux-musl/12/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --disable-libunwind-exceptions --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 12.2.1_p20221224 p7' --with-gcc-major-version-only --disable-esp --enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-multilib --with-multilib-list=m64 --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp --disable-libada --disable-cet --disable-systemtap --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --without-zstd --enable-lto --without-isl --disable-libsanitizer --enable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.2.1 20221224 (Gentoo 12.2.1_p20221224 p7)
Comment 19 tt_1 2023-01-01 14:19:18 UTC
>=sys-devel/gcc-11.3.1_p20221223 is also affected, propably branch 10 as well
Comment 20 Arsen Arsenović gentoo-dev 2023-01-01 21:49:29 UTC
Could you pull out a backtrace via a tool like sys-process/minicoredumper?  I'm suspicious of those patches being related since I don't see -flto in your flags.
Comment 21 tt_1 2023-01-01 21:53:34 UTC
I could give it a try, but it doesn't build with musl :-)
Comment 22 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-02 00:14:12 UTC
(In reply to tt_1 from comment #21)
> I could give it a try, but it doesn't build with musl :-)

Running the failing command manually with gdb would work too.
Comment 23 tt_1 2023-01-02 08:54:41 UTC
Created attachment 846522 [details]
all 10 segfaults on amd64 with -j12

how does piping the whole gcc command through gdb work? 

I did execute the xgcc command outside of portage, and it does not error at any point, leaving the correct object file (avx_savms64_s.o) in the libgcc dir
Comment 24 Arsen Arsenović gentoo-dev 2023-01-02 10:13:08 UTC
https://gcc-newbies-guide.readthedocs.io/en/latest/debugging.html

Though, again, I'd recommend just dealing with coredumps.  That'd be easier to collect anyway.
Comment 25 ernsteiswuerfel archtester 2023-01-02 10:39:11 UTC
(In reply to tt_1 from comment #23)
> I did execute the xgcc command outside of portage, and it does not error at
> any point, leaving the correct object file (avx_savms64_s.o) in the libgcc
> dir
I think it successfully built with MAKEOPTS="-j1" as I wanted to have a closer look at it some time ago... With the usual -j16 I do on Talos II it always segfaulted.

Have to check that again.
Comment 26 tt_1 2023-01-02 14:01:24 UTC
segfault with -j2 on armv7a:

/var/tmp/portage/sys-devel/gcc-12.2.1_p20221231/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-12.2.1_p20221231/work/build/./gcc/ -B/usr/armv7a-unknown-linux-musleabihf/bin/ -B/usr/armv7a-unknown-linux-musleabihf/lib/ -isystem /usr/armv7a-unknown-linux-musleabihf/include -isystem /usr/armv7a-unknown-linux-musleabihf/sys-include   -fno-checking -g -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -O2 -O2  -g -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -fno-inline -DGTHREAD_USE_WEAK=0 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fno-stack-clash-protection  -fPIC -fno-inline -DGTHREAD_USE_WEAK=0 -I. -I. -I../.././gcc -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221231/work/gcc-12-20221231/libgcc -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221231/work/gcc-12-20221231/libgcc/. -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221231/work/gcc-12-20221231/libgcc/../gcc -I/var/tmp/portage/sys-devel/gcc-12.2.1_p20221231/work/gcc-12-20221231/libgcc/../include  -DHAVE_CC_TLS   -o _thumb1_case_sqi_s.o -MT _thumb1_case_sqi_s.o -MD -MP -MF _thumb1_case_sqi_s.dep -DSHARED -DL_thumb1_case_sqi -xassembler-with-cpp -c /var/tmp/portage/sys-devel/gcc-12.2.1_p20221231/work/gcc-12-20221231/libgcc/config/arm/lib1funcs.S
make[3]: *** [Makefile:491: _thumb1_case_sqi_s.o] Segmentation fault
make[3]: *** Deleting file '_thumb1_case_sqi_s.o'
Comment 27 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-02 22:39:36 UTC
Please setup minicoredumper, make the crash happen again, then look for the dir where minicoredumper put its corefile.

and/or try the steps from https://stackoverflow.com/a/29668405 to make gcc just dump a core file when it crashes. The error message should then change to "segmentation fault (core dumped)".
Comment 28 ernsteiswuerfel archtester 2023-01-03 15:55:31 UTC
At the moment minicoredumper does not build on musl (see bug #716542), but upstream is taking a look at it: https://github.com/diamon/minicoredumper/issues/5
Comment 29 Larry the Git Cow gentoo-dev 2023-01-11 07:55:06 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=049db9896df60dc4fce131b31e44901c22a7350d

commit 049db9896df60dc4fce131b31e44901c22a7350d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-11 07:53:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-11 07:54:21 +0000

    sys-devel/gcc: keyword 12.2.1_p20221126 (shadowed, just for musl)
    
    Newer versions don't work on musl. This doesn't affect others who will
    already have a newer version installed.
    
    Bug: https://bugs.gentoo.org/885501
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/gcc-12.2.1_p20221126.ebuild | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Comment 30 Larry the Git Cow gentoo-dev 2023-01-23 00:35:25 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=d3c10f4c409a3b6c07c453af289c5e23420156f1

commit d3c10f4c409a3b6c07c453af289c5e23420156f1
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-23 00:23:09 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-23 00:35:20 +0000

    12.2.0: backport driver environ corruption fix
    
    Bug: https://bugs.gentoo.org/885501
    Signed-off-by: Sam James <sam@gentoo.org>

 .../76_all_driver_environ_putenv_PR106624.patch    | 44 ++++++++++++++++++++++
 12.2.0/gentoo/README.history                       |  3 ++
 2 files changed, 47 insertions(+)

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3efe77f935c0d12b9bcc869bca60669e12a0c0ad

commit 3efe77f935c0d12b9bcc869bca60669e12a0c0ad
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-23 00:27:56 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-23 00:35:20 +0000

    11.4.0: backport driver environ corruption fix
    
    Bug: https://bugs.gentoo.org/885501
    Signed-off-by: Sam James <sam@gentoo.org>

 .../77_all_driver_environ_putenv_PR106624.patch    | 44 ++++++++++++++++++++++
 11.4.0/gentoo/README.history                       |  3 +-
 2 files changed, 46 insertions(+), 1 deletion(-)

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=2d7f885131fa8fba81d0a6f558ba58044b9ee726

commit 2d7f885131fa8fba81d0a6f558ba58044b9ee726
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-23 00:31:27 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-23 00:35:20 +0000

    10.5.0: backport driver environ corruption fix
    
    Bug: https://bugs.gentoo.org/885501
    Signed-off-by: Sam James <sam@gentoo.org>

 .../77_all_driver_environ_putenv_PR106624.patch    | 44 ++++++++++++++++++++++
 10.5.0/gentoo/README.history                       |  3 ++
 2 files changed, 47 insertions(+)
Comment 31 Larry the Git Cow gentoo-dev 2023-01-23 00:43:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=016184c289f2cc6c6ade496a700a12f135fbae07

commit 016184c289f2cc6c6ade496a700a12f135fbae07
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-23 00:25:35 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-23 00:42:40 +0000

    sys-devel/gcc: backport CET fix for 11; further make jobserver related fixes for all
    
    - jobserver:
     Led to crashes during build in some cases. Note that this is a bug in the driver
     so could easily happen when using GCC to build other things too.
    
    - CET:
      See https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=15daf0510a5fab17cd556261d688a6618391a0c1
      for details, but went for a more conservative approach for GCC 11.
    
    Bug: https://bugs.gentoo.org/822036
    Closes: https://bugs.gentoo.org/885501
    Closes: https://bugs.gentoo.org/891655
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest                             |  4 +-
 ...30119.ebuild => gcc-10.4.1_p20230119-r1.ebuild} |  8 ++--
 ...30120.ebuild => gcc-11.3.1_p20230120-r1.ebuild} |  8 ++--
 sys-devel/gcc/gcc-12.2.1_p20230121-r1.ebuild       | 52 ++++++++++++++++++++++
 4 files changed, 63 insertions(+), 9 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f76f7528c9fd5f4366bdb53ad9f5741353edcb2d

commit f76f7528c9fd5f4366bdb53ad9f5741353edcb2d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-23 00:40:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-23 00:42:41 +0000

    profiles/features/musl: update musl/gcc segfault masks
    
    Bug: https://bugs.gentoo.org/885501
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/features/musl/package.mask | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 32 tt_1 2023-01-24 09:58:57 UTC
thanks for finding the regression, I can confirm building with -j12 on amd64 is fixed now with patchset 10 for gcc-12.2.1_p20230121-r1

did you ask upstream for a backport to the relevant branches, to which the regression causing changes in the jobserver code were commited? I believe its branch gcc-12,11, and maybe 10 as well.
Comment 33 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-24 10:05:07 UTC
(In reply to tt_1 from comment #32)
> thanks for finding the regression, I can confirm building with -j12 on amd64
> is fixed now with patchset 10 for gcc-12.2.1_p20230121-r1
> 
> did you ask upstream for a backport to the relevant branches, to which the
> regression causing changes in the jobserver code were commited? I believe
> its branch gcc-12,11, and maybe 10 as well.

Yes. Done on IRC yesterday by Arsen and we'll chase it up if it's not done.
Comment 34 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-24 10:05:38 UTC
Also, thanks for confirming it's ok!