Subject: | /(?{ CODE })/ with restricted ops inside crashes perl |
surikov@alexey-pc:~> perl -MSafe
$safe = Safe->new;
$safe->permit_only(qw(
:base_core
:base_mem
:base_loop
:base_math
:base_orig
print
time
sort
));
$safe->reval("/(?{system'id'})/");
^D
... huge error log goes here (attached) ...
Aborted
surikov@alexey-pc:~>
Subject: | perl.version |
Summary of my perl5 (revision 5 version 12 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.32, archname=i586-linux-thread-multi
uname='linux build35 2.6.32 #1 smp 2010-01-06 16:07:25 +0100 i686 athlon i386 gnulinux '
config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true -Doptimize=-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe -Accflags=-DPERL_USE_SAFE_PUTENV'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector'
ccversion='', gccversion='4.5.0 20100604 [gcc-4_5-branch revision 160292]', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector'
libpth=/lib /usr/lib /usr/local/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.11.2.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.11.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.12.1/i586-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_TRACK_MEMPOOL PERL_USE_SAFE_PUTENV USE_ITHREADS
USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF
USE_REENTRANT_API
Built under linux
Compiled at Jul 30 2010 00:17:08
%ENV:
PERL5LIB="/home/surikov/infolavka/whoyougle/lib"
@INC:
/home/surikov/infolavka/whoyougle/lib
/usr/lib/perl5/site_perl/5.12.1/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.12.1
/usr/lib/perl5/vendor_perl/5.12.1/i586-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.12.1
/usr/lib/perl5/5.12.1/i586-linux-thread-multi
/usr/lib/perl5/5.12.1
.
Subject: | crash.log |
perl: pp_ctl.c:3902: Perl_delete_eval_scope: Assertion `((char*)(my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1] == (char*)"eval_scope") || (!__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]) && __builtin_constant_p ("eval_scope") && (__s1_len = strlen ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]), __s2_len = strlen ("eval_scope"), (!((size_t)(const void *)(((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]) + 1) - (size_t)(const void *)((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("eval_scope") + 1) - (size_t)(const void *)("eval_scope") == 1) || __s2_len >= 4)) ? __builtin_strcmp ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1], "eval_scope") : (__builtin_constant_p ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]) && ((size_t)(const void *)(((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]) + 1) - (size_t)(const void *)((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]) == 1) && (__s1_len = strlen ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]), __s1_len < 4) ? (__builtin_constant_p ("eval_scope") && ((size_t)(const void *)(("eval_scope") + 1) - (size_t)(const void *)("eval_scope") == 1) ? __builtin_strcmp ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1], "eval_scope") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("eval_scope"); int __result = (((__const unsigned char *) (__const char *) ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("eval_scope") && ((size_t)(const void *)(("eval_scope") + 1) - (size_t)(const void *)("eval_scope") == 1) && (__s2_len = strlen ("eval_scope"), __s2_len < 4) ? (__builtin_constant_p ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]) && ((size_t)(const void *)(((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]) + 1) - (size_t)(const void *)((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]) == 1) ? __builtin_strcmp ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1], "eval_scope") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1]); int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("eval_scope"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("eval_scope"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("eval_scope"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("eval_scope"))[3]); } } __result; }))) : __builtin_strcmp ((my_perl->Iscopestack_name)[(my_perl->Iscopestack_ix)-1], "eval_scope")))); }))' failed.