Closed
Description
Module:
Description
Running this code:
use builtin 'ceil';
my $x;
BEGIN {
my $e = <<'EOS';
sub { ceil($_[0]) }
EOS
$x = eval $e;
}
in a DEBUGGING build throws:
$ ./perl -Ilib ../ceilassert.pl
perl: op.c:14769: Perl_find_lexical_cv: Assertion `PARENT_PAD_INDEX(name)' failed.
Aborted
Backtrace:
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff7c65537 in __GI_abort () at abort.c:79
#2 0x00007ffff7c6540f in __assert_fail_base (
fmt=0x7ffff7dce128 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=0x55555594579a "PARENT_PAD_INDEX(name)",
file=0x55555593e331 "op.c", line=14769, function=<optimized out>)
at assert.c:92
#3 0x00007ffff7c74662 in __GI___assert_fail (
assertion=0x55555594579a "PARENT_PAD_INDEX(name)",
file=0x55555593e331 "op.c", line=14769,
function=0x5555559482c0 <__PRETTY_FUNCTION__.33> "Perl_find_lexical_cv")
at assert.c:101
#4 0x00005555555dd638 in Perl_find_lexical_cv (off=1) at op.c:14769
#5 0x0000555555660eee in yyl_keylookup (s=0x555555c09a2a "($_[0]) }\n\n;",
gv=0x0) at toke.c:8805
#6 0x0000555555663a6e in yyl_try (s=0x555555c09a26 "ceil($_[0]) }\n\n;")
at toke.c:9319
#7 0x0000555555664ed9 in Perl_yylex () at toke.c:9621
#8 0x000055555567ab7e in Perl_yyparse (gramtype=258) at perly.c:357
#9 0x0000555555851412 in S_doeval_compile (gimme=2 '\002',
outside=0x555555bf6e08, seq=201, hh=0x0) at pp_ctl.c:3613
#10 0x0000555555858fd3 in Perl_pp_entereval () at pp_ctl.c:4580
#11 0x0000555555729e64 in Perl_runops_debug () at dump.c:2677
#12 0x00005555555f27de in Perl_call_sv (sv=0x555555bf6e08, flags=13)
at perl.c:3077
#13 0x00005555555fc259 in Perl_call_list (oldscope=2, paramList=0x555555bf6e68)
at perl.c:5148
#14 0x00005555555d1173 in S_process_special_blocks (floor=42,
fullname=0x555555c150f0 "\001", gv=0x555555bf6e80, cv=0x555555bf6e08)
at op.c:12116
#15 0x00005555555d081a in Perl_newATTRSUB_x (floor=42, o=0x555555c00f60,
proto=0x0, attrs=0x0, block=0x555555c0eae0, o_is_gv=false) at op.c:12021
#16 0x000055555567b7d8 in Perl_yyparse (gramtype=258) at perly.y:330
#17 0x00005555555f01b5 in S_parse_body (env=0x0,
xsinit=0x5555555a31d2 <xs_init>) at perl.c:2556
#18 0x00005555555ee511 in perl_parse (my_perl=0x555555bd02a0,
xsinit=0x5555555a31d2 <xs_init>, argc=3, argv=0x7fffffffe7f8, env=0x0)
at perl.c:1847
#19 0x00005555555a3118 in main (argc=3, argv=0x7fffffffe7f8,
env=0x7fffffffe818) at perlmain.c:106
Steps to Reproduce
Expected behavior
No assertion.
Perl configuration
Summary of my perl5 (revision 5 version 37 subversion 1) configuration:
Commit id: 75111994648b802c88381a3cd338185fd1bbb6fa
Platform:
osname=linux
osvers=5.10.0-14-amd64
archname=x86_64-linux
uname='linux venus 5.10.0-14-amd64 #1 smp debian 5.10.113-1 (2022-04-29) x86_64 gnulinux '
config_args='-des -Dusedevel -DDEBUGGING -Doptimize=-O0 -g'
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 ='-fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-O0 -g'
cppflags='-fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='10.2.1 20210110'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
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 -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/x86_64-linux-gnu /usr/lib /usr/lib64
libs=-lpthread -lnsl -lgdbm -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.31.so
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.31'
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O0 -g -L/usr/local/lib -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options:
DEBUGGING
HAS_TIMES
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_USE_DEVEL
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 linux
Compiled at Jun 13 2022 14:25:47
%ENV:
PERLBREW_BASHRC_VERSION="0.43"
PERLBREW_HOME="/home/tony/.perlbrew"
PERLBREW_MANPATH=""
PERLBREW_PATH="/home/tony/perl5/perlbrew/bin"
PERLBREW_ROOT="/home/tony/perl5/perlbrew"
PERLBREW_VERSION="0.67"
@INC:
lib
/usr/local/lib/perl5/site_perl/5.37.1/x86_64-linux
/usr/local/lib/perl5/site_perl/5.37.1
/usr/local/lib/perl5/5.37.1/x86_64-linux
/usr/local/lib/perl5/5.37.1
Metadata
Metadata
Assignees
Labels
No labels