-
Notifications
You must be signed in to change notification settings - Fork 601
Closed as duplicate of#23405
Closed as duplicate of#23405
Copy link
Description
Module:
Description
Segmentation fault occurs when running on a script that combines:
- builtin::indexed
- lexcial subroutine
Steps to Reproduce
Create a file a.pl with the following content:
use v5.42;
my sub foo(@list) {
for my ($i, $v) (indexed @list) {
say "$i: $v";
}
}
# Following are working:
#
# my sub foo(@list) {
# for my ($i, $v) (builtin::indexed @list) {
# say "$i: $v";
# }
# }
#
# sub foo(@list) {
# for my ($i, $v) (indexed @list) {
# say "$i: $v";
# }
# }
foo('a', 'b', 'c');Then run:
perl a.pl
Expected behavior
If run perl a.pl, then print elements of list.
Perl configuration
Summary of my perl5 (revision 5 version 42 subversion 0) configuration:
Platform:
osname=darwin
osvers=23.6.0
archname=darwin-2level
uname='darwin mac-1751572464836.local 23.6.0 darwin kernel version 23.6.0: thu apr 24 20:27:23 pdt 2025; root:xnu-10063.141.1.705.2~1release_arm64_vmapple arm64 '
config_args='-Dprefix=/opt/perl -Duserelocatableinc -Dman1dir=none -Dman3dir=none -DDEBUGGING=-g -des'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='cc'
ccflags ='-fno-common -DPERL_DARWIN -DNO_THREAD_SAFE_QUERYLOCALE -DNO_POSIX_2008_LOCALE -DHAS_BROKEN_LANGINFO_CODESET -fno-strict-aliasing -pipe -fstack-protector-strong'
optimize='-O3 -g'
cppflags='-fno-common -DPERL_DARWIN -DNO_THREAD_SAFE_QUERYLOCALE -DNO_POSIX_2008_LOCALE -DHAS_BROKEN_LANGINFO_CODESET -fno-strict-aliasing -pipe -fstack-protector-strong'
ccversion=''
gccversion='Apple LLVM 15.0.0 (clang-1500.3.9.4)'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=8
longdblkind=0
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='cc'
ldflags =' -fstack-protector-strong'
libpth=/Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/lib /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib /Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /usr/lib
libs=
perllibs=
libc=
so=dylib
useshrplib=false
libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=bundle
d_dlsymun=undef
ccdlflags=' '
cccdlflags=' '
lddlflags='-bundle -undefined dynamic_lookup -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_LONG_DOUBLE
HAS_STRTOLD
HAS_TIMES
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_SIPHASH13
PERL_HASH_USE_SBOX32
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_USE_SAFE_PUTENV
USE_64_BIT_ALL
USE_64_BIT_INT
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
Built under darwin
Compiled at Jul 3 2025 20:07:15
@INC:
/Users/kfly8/.local/share/mise/installs/perl/5.42.0.0/perl-darwin-arm64/lib/site_perl/5.42.0/darwin-2level
/Users/kfly8/.local/share/mise/installs/perl/5.42.0.0/perl-darwin-arm64/lib/site_perl/5.42.0
/Users/kfly8/.local/share/mise/installs/perl/5.42.0.0/perl-darwin-arm64/lib/5.42.0/darwin-2level
/Users/kfly8/.local/share/mise/installs/perl/5.42.0.0/perl-darwin-arm64/lib/5.42.0
Metadata
Metadata
Assignees
Labels
No labels