Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 821577

Summary: dev-lang/perl-5.34.0-r5: fails to build on s390(x) (Attempt to free unreferenced scalar: SV 0x16f9720 at lib/strict.pm line 38.)
Product: Gentoo Linux Reporter: Sam James <sam>
Component: Current packagesAssignee: Gentoo Perl team <perl>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: s390   
OS: Linux   
URL: https://github.com/Perl/perl5/issues/19307
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-04 04:47:45 UTC
Created attachment 748377 [details]
build.log

s390x-ibm-linux-gnu-gcc -c -DPERL_CORE -O2 -pipe -march=z10 -Wimplicit-function-declaration -Wnonnull -Wstrict-aliasing -Wparentheses -Warray-bounds -Wfree-nonheap-object -Wreturn-local-addr -fwrapv -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89 -O2 -pipe -march=z10 -Wimplicit-function-declaration -Wnonnull -Wstrict-aliasing -Wparentheses -Warray-bounds -Wfree-nonheap-object -Wreturn-local-addr -Wall -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -Werror=declaration-after-statement -fPIC perly.c
s390x-ibm-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -o miniperl \
    opmini.o perlmini.o  gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o dquote.o time64.o  miniperlmain.o  -ldl -lm -lcrypt -lutil -lc
LD_LIBRARY_PATH=/var/tmp/portage/dev-lang/perl-5.34.0-r5/work/perl-5.34.0 /var/tmp/portage/dev-lang/perl-5.34.0-r5/work/perl-5.34.0/preload /var/tmp/portage/dev-lang/perl-5.34.0-r5/work/perl-5.34.0/libperl.so.5.34.0 ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
Attempt to free unreferenced scalar: SV 0x172ca48.
Attempt to free unreferenced scalar: SV 0x16f9720 at lib/strict.pm line 38.
Failed to build miniperl. Please run make minitest
make: *** [makefile:364: lib/buildcustomize.pl] Error 1
make: *** Waiting for unfinished jobs....
 * ERROR: dev-lang/perl-5.34.0-r5::gentoo failed (compile phase):
 *   emake failed

----

Portage 3.0.28 (python 3.9.6-final-0, default/linux/s390/17.0/s390x, gcc-9.3.0, glibc-2.33-r7, 5.10.7 s390x)
=================================================================
System uname: Linux-5.10.7-s390x-8561-with-glibc2.33
KiB Mem:     2055988 total,   1302720 free
KiB Swap:      99160 total,     52828 free
Timestamp of repository gentoo: Thu, 04 Nov 2021 03:45:01 +0000
Head commit of repository gentoo: 6ee446b03ae65d3c683137e2da3add8d08dbc3a5
sh bash 5.1_p8
ld GNU ld (Gentoo 2.36.1 p3) 2.36.1
ccache version 4.3 [disabled]
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0-r1::gentoo
dev-lang/python:          3.9.6::gentoo, 3.10.0_beta4::gentoo
dev-util/ccache:          4.3-r2::gentoo
dev-util/cmake:           3.21.0::gentoo
sys-apps/baselayout:      2.8::gentoo
sys-apps/openrc:          0.43.3::gentoo
sys-apps/sandbox:         2.29::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.36.1-r1::gentoo
sys-devel/gcc:            9.3.0-r1::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.14::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.namerica.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="s390 ~s390"
ACCEPT_LICENSE="@FREE"
CBUILD="s390x-ibm-linux-gnu"
CFLAGS="-O2 -pipe -march=z10 -Wimplicit-function-declaration -Wnonnull -Wstrict-aliasing -Wparentheses -Warray-bounds -Wfree-nonheap-object -Wreturn-local-addr"
CHOST="s390x-ibm-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=z10"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc noinfo parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org"
LANG="en_US.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="xz"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl big-endian bzip2 cli crypt dri fortran gdbm iconv ipv6 multislot ncurses nls nptl openmp pam pcre readline s390 seccomp split-usr ssl unicode xattr zlib" ABI_S390="64" ADA_TARGET="gnat_2019" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="void libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-04 05:06:37 UTC
Same on s390 (lgentoo3). s390x box was lgentoo4.
Comment 2 Larry the Git Cow gentoo-dev 2021-11-05 01:10:17 UTC
The bug has been referenced in the following commit(s):

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

commit 29830cdf4858be3cb76a7fe2976a0695509bf8cd
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-11-05 01:10:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-11-05 01:10:11 +0000

    profiles/arch/s390: mask dev-lang/perl-5.34.0-r5 (segfaults during build)
    
    Bug: https://bugs.gentoo.org/821577
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/arch/s390/package.mask | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-05 01:12:42 UTC
Backtrace from s390 (lgentoo3):

```
# gdb --args ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>'
[...]
Reading symbols from ./miniperl...
(gdb) r
Starting program: /var/tmp/portage/dev-lang/perl-5.34.0-r5/work/perl-5.34.0/miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e \<\?\>
Attempt to free unreferenced scalar: SV 0x6a75f8.
Attempt to free unreferenced scalar: SV 0x692568 at lib/strict.pm line 38.

Program received signal SIGSEGV, Segmentation fault.
S_mg_findext_flags (flags=0, vtbl=0x0, type=type@entry=60, sv=0x6be52c) at mg.c:409
409             for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
(gdb) bt
#0  S_mg_findext_flags (flags=0, vtbl=0x0, type=type@entry=60, sv=0x6be52c) at mg.c:409
#1  Perl_mg_find (sv=0x6be52c, type=type@entry=60) at mg.c:430
#2  0x004c5ca8 in Perl_sv_del_backref (tsv=0x6be52c, sv=sv@entry=0x6a7c48) at sv.c:6154
#3  0x0043416e in Perl_cvstash_set (cv=cv@entry=0x6a7c48, st=0x6a78c8) at gv.c:318
#4  0x00424df8 in Perl_newATTRSUB_x (floor=<optimized out>, o=<optimized out>, proto=<optimized out>, attrs=<optimized out>, block=0x6c1828, o_is_gv=<optimized out>) at op.c:11667
#5  0x0045ee36 in Perl_yyparse (gramtype=gramtype@entry=258) at perly.y:324
#6  0x004f62b6 in S_doeval_compile (gimme=gimme@entry=2 '\002', outside=outside@entry=0x0, seq=7, hh=hh@entry=0x0) at pp_ctl.c:3559
#7  0x004f807a in S_require_file (sv=<optimized out>) at pp_ctl.c:4370
#8  Perl_pp_require () at pp_ctl.c:4394
#9  0x004b7ef4 in Perl_runops_standard () at run.c:41
#10 0x0042af7a in Perl_call_sv (sv=sv@entry=0x6a7748, flags=flags@entry=13) at perl.c:3079
#11 0x0042da06 in Perl_call_list (oldscope=oldscope@entry=6, paramList=0x6a76e8) at perl.c:5113
#12 0x0040d900 in S_process_special_blocks (floor=floor@entry=144, fullname=<optimized out>, fullname@entry=0x6adf2c "BEGIN", gv=gv@entry=0x6a77a8, cv=cv@entry=0x6a7748) at op.c:11811
#13 0x00424d50 in Perl_newATTRSUB_x (floor=floor@entry=144, o=<optimized out>, o@entry=0x6b58ec, proto=<optimized out>, proto@entry=0x0, attrs=<optimized out>, attrs@entry=0x0, block=0x6b587c,
    block@entry=0x6b5b7c, o_is_gv=<optimized out>) at op.c:11736
#14 0x0042810c in Perl_utilize (aver=<optimized out>, floor=144, version=<optimized out>, idop=<optimized out>, arg=<optimized out>, arg@entry=0x0) at op.c:8834
#15 0x0045d892 in Perl_yyparse (gramtype=gramtype@entry=258) at perly.y:364
#16 0x004f62b6 in S_doeval_compile (gimme=gimme@entry=2 '\002', outside=outside@entry=0x0, seq=6, hh=hh@entry=0x0) at pp_ctl.c:3559
#17 0x004f807a in S_require_file (sv=<optimized out>) at pp_ctl.c:4370
#18 Perl_pp_require () at pp_ctl.c:4394
#19 0x004b7ef4 in Perl_runops_standard () at run.c:41
#20 0x0042af7a in Perl_call_sv (sv=sv@entry=0x6a7618, flags=flags@entry=13) at perl.c:3079
#21 0x0042da06 in Perl_call_list (oldscope=oldscope@entry=2, paramList=0x692688) at perl.c:5113
#22 0x0040d900 in S_process_special_blocks (floor=floor@entry=42, fullname=<optimized out>, fullname@entry=0x6adf2c "BEGIN", gv=gv@entry=0x6a7658, cv=cv@entry=0x6a7618) at op.c:11811
#23 0x00424d50 in Perl_newATTRSUB_x (floor=floor@entry=42, o=<optimized out>, o@entry=0x6ad54c, proto=<optimized out>, proto@entry=0x0, attrs=<optimized out>, attrs@entry=0x0, block=0x6ad4dc,
    block@entry=0x6adcd4, o_is_gv=<optimized out>) at op.c:11736
#24 0x0042810c in Perl_utilize (aver=<optimized out>, floor=42, version=<optimized out>, idop=<optimized out>, arg=<optimized out>, arg@entry=0x0) at op.c:8834
#25 0x0045d892 in Perl_yyparse (gramtype=gramtype@entry=258) at perly.y:364
#26 0x00432488 in S_parse_body (xsinit=0x574708 <xs_init>, env=0x0) at perl.c:2558
#27 perl_parse (my_perl=<optimized out>, xsinit=xsinit@entry=0x574708 <xs_init>, argc=<optimized out>, argv=<optimized out>, env=env@entry=0x0) at perl.c:1853
#28 0x0040af48 in main (argc=<optimized out>, argv=<optimized out>, env=<optimized out>) at miniperlmain.c:115
```
Comment 4 Larry the Git Cow gentoo-dev 2021-11-05 05:19:22 UTC Comment hidden (obsolete)
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2021-11-07 00:23:47 UTC
The only way out that I see here is an upstream bug report. 
(I wonder if anyone is actually running that arch there.)
Comment 6 Larry the Git Cow gentoo-dev 2021-12-31 04:20:01 UTC
The bug has been referenced in the following commit(s):

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

commit 19f7749f3ceb45e3c87a13eedc0e0c4b4cfaa060
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-31 04:19:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-31 04:19:50 +0000

    profiles/arch/s390: update Perl mask
    
    Bug: https://bugs.gentoo.org/821577
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/arch/s390/package.mask | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 7 Larry the Git Cow gentoo-dev 2022-02-25 16:32:05 UTC
The bug has been closed via the following commit(s):

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

commit cde79fe919fa29946337a61d4729672b7462c407
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2022-02-25 16:31:07 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2022-02-25 16:31:55 +0000

    dev-lang/perl: Use -Accflags="${CFLAGS}" instead of -Dccflags=...
    
    Closes: https://bugs.gentoo.org/821577
    Closes: https://github.com/Perl/perl5/issues/19307
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 dev-lang/perl/perl-5.34.0-r8.ebuild | 828 ++++++++++++++++++++++++++++++++++++
 1 file changed, 828 insertions(+)
Comment 8 Larry the Git Cow gentoo-dev 2022-04-18 23:32:38 UTC
The bug has been referenced in the following commit(s):

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

commit 1d2700aa5e1c1495045e702d92e17142fc7321ce
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2022-04-18 23:31:49 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2022-04-18 23:32:27 +0000

    arch/s390: unmask new perl
    
    Bug: https://bugs.gentoo.org/821577
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 profiles/arch/s390/package.mask | 5 -----
 1 file changed, 5 deletions(-)