Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906380 - sys-devel/gcc-13: ICE: segmentation fault on musl (was: dev-libs/cxxtools-3.0-r2 fails to compile (MUSL-SYSTEM): clock.cpp:91:1: internal compiler error: Segmentation fault (ICE))
Summary: sys-devel/gcc-13: ICE: segmentation fault on musl (was: dev-libs/cxxtools-3.0...
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:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-15 08:28 UTC by Agostino Sarubbo
Modified: 2023-05-21 00:54 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,63.25 KB, text/plain)
2023-05-15 08:28 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-05-15 08:28:48 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-libs/cxxtools-3.0-r2 fails to compile (MUSL-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc but this bug MAY or MAY NOT BE related to musl.
Comment 1 Agostino Sarubbo gentoo-dev 2023-05-15 08:28:50 UTC
Created attachment 861718 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-05-15 08:28:50 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


clock.cpp:91:1: internal compiler error: Segmentation fault
clock.cpp:91:1: internal compiler error: Segmentation fault
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-15 18:30:30 UTC
Needs musl. Looking...
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-15 19:51:52 UTC
```
/var/tmp/portage/dev-libs/cxxtools-3.0-r2/work/cxxtools-3.0/src # x86_64-gentoo-linux-musl-g++ -DHAVE_CONFIG_H -I. -I../src -I../include -I../include -Wno-long-long -Wall -pedantic -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -D_GLIBCXX_ASSERTIONS -fno-analyzer -c clock.cpp  -fPIC -DPIC -o .libs/clock.o -wrapper valgrind
==719147== Memcheck, a memory error detector
==719147== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==719147== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info
==719147== Command: /usr/libexec/gcc/x86_64-gentoo-linux-musl/13/cc1plus -quiet -I . -I ../src -I ../include -I ../include -D_GNU_SOURCE -D HAVE_CONFIG_H -D _GLIBCXX_ASSERTIONS -D PIC clock.cpp -march=znver2 -mmmx -mpopcnt -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -msse4a -mno-fma4 -mno-xop -mfma -mno-avx512f -mbmi -mbmi2 -maes -mpclmul -mno-avx512vl -mno-avx512bw -mno-avx512dq -mno-avx512cd -mno-avx512er -mno-avx512pf -mno-avx512vbmi -mno-avx512ifma -mno-avx5124vnniw -mno-avx5124fmaps -mno-avx512vpopcntdq -mno-avx512vbmi2 -mno-gfni -mno-vpclmulqdq -mno-avx512vnni -mno-avx512bitalg -mno-avx512bf16 -mno-avx512vp2intersect -mno-3dnow -madx -mabm -mno-cldemote -mclflushopt -mclwb -mclzero -mcx16 -mno-enqcmd -mf16c -mfsgsbase -mfxsr -mno-hle -msahf -mno-lwp -mlzcnt -mmovbe -mno-movdir64b -mno-movdiri -mmwaitx -mno-pconfig -mno-pku -mno-prefetchwt1 -mprfchw -mno-ptwrite -mrdpid -mrdrnd -mrdseed -mno-rtm -mno-serialize -mno-sgx -msha -mno-shstk -mno-tbm -mno-tsxldtrk -mno-vaes -mno-waitpkg -mwbnoinvd -mxsave -mxsavec -mxsaveopt -mxsaves -mno-amx-tile -mno-amx-int8 -mno-amx-bf16 -mno-uintr -mno-hreset -mno-kl -mno-widekl -mno-avxvnni -mno-avx512fp16 -mno-avxifma -mno-avxvnniint8 -mno-avxneconvert -mno-cmpccxadd -mno-amx-fp16 -mno-prefetchi -mno-raoint -mno-amx-complex --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=znver2 -quiet -dumpdir .libs/ -dumpbase clock.cpp -dumpbase-ext .cpp -O2 -Wno-long-long -Wall -Wpedantic -fdiagnostics-color=always -frecord-gcc-switches -fno-analyzer -fPIC -fcf-protection -o -
==719147==
==719147== Invalid read of size 1
==719147==    at 0x97844C: to_wide (tree.h:6257)
==719147==    by 0x97844C: irange::set_varying(tree_node*) (value-range.h:959)
==719147==    by 0x10C1A45: range_query::get_tree_range(vrange&, tree_node*, gimple*) (value-query.cc:252)
==719147==    by 0x1B52256: gimple_ranger::range_of_stmt(vrange&, gimple*, tree_node*) (gimple-range.cc:298)
==719147==    by 0x1B52778: gimple_ranger::register_inferred_ranges(gimple*) (gimple-range.cc:474)
==719147==    by 0x109FB19: rvrp_folder::fold_stmt(gimple_stmt_iterator*) (tree-vrp.cc:1079)
==719147==    by 0xFA9ED3: substitute_and_fold_dom_walker::before_dom_children(basic_block_def*) (tree-ssa-propagate.cc:848)
==719147==    by 0x1B24C2E: dom_walker::walk(basic_block_def*) (domwalk.cc:311)
==719147==    by 0xFA9312: substitute_and_fold_engine::substitute_and_fold(basic_block_def*) (tree-ssa-propagate.cc:971)
==719147==    by 0x109DB80: execute_ranger_vrp(function*, bool, bool) (tree-vrp.cc:1107)
==719147==    by 0xD3A0EA: execute_one_pass(opt_pass*) (passes.cc:2651)
==719147==    by 0xD3A9AF: execute_pass_list_1(opt_pass*) (passes.cc:2760)
==719147==    by 0xD3A9C1: execute_pass_list_1(opt_pass*) (passes.cc:2761)
==719147==  Address 0x4 is not stack'd, malloc'd or (recently) free'd
==719147==
during GIMPLE pass: evrp
clock.cpp: In constructor 'cxxtools::Clock::Clock()':
clock.cpp:91:1: internal compiler error: Segmentation fault
   91 | } //namespace cxxtools
      | ^
0xe10df3 crash_signal
        /usr/src/debug/sys-devel/gcc-13.1.1_p20230513/gcc-13-20230513/gcc/toplev.cc:314
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
==719147==
==719147== HEAP SUMMARY:
==719147==     in use at exit: 4,206,449 bytes in 9,823 blocks
==719147==   total heap usage: 144,096 allocs, 134,273 frees, 54,812,345 bytes allocated
==719147==
==719147== LEAK SUMMARY:
==719147==    definitely lost: 1,266 bytes in 1 blocks
==719147==    indirectly lost: 0 bytes in 0 blocks
==719147==      possibly lost: 48,192 bytes in 6 blocks
==719147==    still reachable: 4,156,991 bytes in 9,816 blocks
==719147==                       of which reachable via heuristic:
==719147==                         newarray           : 1,544 bytes in 1 blocks
==719147==         suppressed: 0 bytes in 0 blocks
==719147== Rerun with --leak-check=full to see details of leaked memory
==719147==
==719147== For lists of detected and suppressed errors, rerun with: -s
==719147== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
```
Comment 5 Larry the Git Cow gentoo-dev 2023-05-19 22:49:49 UTC
The bug has been closed via the following commit(s):

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

commit 6fb70c691b854a3c58064a00992345afdff3f452
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-19 22:48:27 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-19 22:49:10 +0000

    sys-devel/gcc: add 12.3.1_p20230519
    
    Closes: https://bugs.gentoo.org/906310
    Closes: https://bugs.gentoo.org/906380
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest                    |  1 +
 sys-devel/gcc/gcc-12.3.1_p20230519.ebuild | 56 +++++++++++++++++++++++++++++++
 sys-devel/gcc/gcc-13.1.1_p20230513.ebuild |  6 ++--
 3 files changed, 60 insertions(+), 3 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2023-05-20 00:12:43 UTC
The bug has been closed via the following commit(s):

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

commit 1e7e9cde26408f39b3aecafdc66e9c3b0ecf7a1f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-20 00:11:32 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-20 00:11:44 +0000

    sys-devel/gcc: add 12.3.1_p20230519
    
    Recommitting just to have atomic commits (as I'd mixed in the gcc-13 keywording
    commit too).
    
    Closes: https://bugs.gentoo.org/906310
    Closes: https://bugs.gentoo.org/906380
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest                    |  1 +
 sys-devel/gcc/gcc-12.3.1_p20230519.ebuild | 56 +++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
Comment 7 Larry the Git Cow gentoo-dev 2023-05-21 00:54:30 UTC
The bug has been referenced in the following commit(s):

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

commit 35f03d1527428b245e974377747ee37aeb74558b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-21 00:54:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-21 00:54:10 +0000

    sys-devel/gcc: add 13.1.1_p20230520
    
    Bug: https://bugs.gentoo.org/906380
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest                    |  1 +
 sys-devel/gcc/gcc-13.1.1_p20230520.ebuild | 62 +++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)