Front page | perl.perl5.porters |
Postings from July 2000
[ID 20000729.003] segfault with (??{ qr/blah/ })
Thread Next
From:
Jeffrey Friedl
Date:
July 31, 2000 11:13
Subject:
[ID 20000729.003] segfault with (??{ qr/blah/ })
Message ID:
200007300530.WAA18871@ventrue.yahoo.com
This is a bug report for perl from jfriedl@fummy.dsl.yahoo.com,
generated with the help of perlbug 1.28 running under perl v5.6.0.
-----------------------------------------------------------------
[Please enter your report here]
Hiho,
The following program segfaults with 5.6.0:
#!/usr/local/bin/perl -w
use strict;
use re 'debugcolor';
use re 'eval';
"AXB" =~ /A (??{ qr[X] }) B/x;
print "matched [$&]\n";
Here's a gdb session:
jfriedl@fummy> gdb perl
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-mandrake-linux"...
(gdb) run /tmp/foo4
Starting program: /usr/src/perl-5.6.0/perl /tmp/foo4
Compiling REx `A (??{ qr[X] }) B'
size 8 Compiling REx `X'
size 3 first at 1
1: EXACT <X>(3)
3: END(0)
anchored `X' at 0 (checking anchored isall) minlen 1
first at 1
1: EXACT <A>(5234)
3: END(0)
anchored `A' at 0 (checking anchored isall) minlen 1
Guessing start of match, REx `A (??{ qr[X] }) B' against `AXB'...
Found anchored substr `A' at offset 0...
Guessed: match at offset 0
Matching REx `A (??{ qr[X] }) B' against `AXB'
Setting an EVAL scope, savestack=3
0 <AXB> | 1: EXACT <A>
1 <AXB> |5234: LOGICAL[2]
1 <AXB> |5235: EVAL
Program received signal SIGSEGV, Segmentation fault.
0x401cc8a1 in S_regmatch (prog=0x812b01c) at re_exec.c:2302
2302 PL_op = (OP_4tree*)PL_regdata->data[n];
(gdb) where
#0 0x401cc8a1 in S_regmatch (prog=0x812b01c) at re_exec.c:2302
#1 0x401cabe9 in S_regtry (prog=0x812afe0, startpos=0x80fc348 "AXB") at re_exec.c:1715
#2 0x401ca4ed in my_regexec (prog=0x812afe0, stringarg=0x80fc348 "AXB", strend=0x80fc34b "",
strbeg=0x80fc348 "AXB", minend=0, sv=0x81283d0, data=0x0, flags=3) at re_exec.c:1509
#3 0x8096cfd in Perl_pp_match () at pp_hot.c:1027
#4 0x80949ed in Perl_runops_standard () at run.c:27
#5 0x805bd4e in S_run_body (oldscope=1) at perl.c:1401
#6 0x805bad8 in perl_run (my_perl=0x80f0858) at perl.c:1325
#7 0x8059903 in main (argc=2, argv=0xbffff374, env=0xbffff380) at perlmain.c:52
Don't know if the following will help, but FWIW here are some current values...
(gdb) print n
$1 = 0
(gdb) print PL_regdata
$2 = (struct reg_data *) 0x0
(gdb) print prog
$3 = (regnode *) 0x812b01c
(gdb) print *prog
$4 = {flags = 1 '\001', type = 51 '3', next_off = 5233}
(gdb) print *scan
$5 = {flags = 222 ',A^(B', type = 75 'K', next_off = 2}
(gdb) print scan
$6 = (regnode *) 0x81301e4
(gdb) print scan
$7 = (regnode *) 0x81301e4
(gdb) print *scan
$8 = {flags = 222 ',A^(B', type = 75 'K', next_off = 2}
(gdb) print PL_curcop
$11 = (COP *) 0x812b070
(gdb) print *PL_curcop
$12 = {op_next = 0x812af68, op_sibling = 0x812afa0, op_ppaddr = 0x8094aa0 <Perl_pp_nextstate>, op_targ = 0,
op_type = 174, op_seq = 2208, op_flags = 1 '\001', op_private = 0 '\000', cop_label = 0x0,
cop_stash = 0x80f08e0, cop_filegv = 0x80f0ab4, cop_seq = 169, cop_arybase = 0, cop_line = 6, cop_warnings = 0x0}
(gdb) print PL_curpad
$13 = (SV **) 0x80f7190
(gdb) print *PL_curpad
$14 = (SV *) 0x80efdd0
(gdb) print **PL_curpad
$15 = {sv_any = 0x0, sv_refcnt = 2147483616, sv_flags = 8388608}
(gdb)
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl v5.6.0:
Configured by jfriedl at Sat Jul 29 20:09:33 PDT 2000.
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=linux, osvers=2.2.15, archname=i686-linux
uname='linux fummy.dsl.yahoo.com 2.2.16 #6 smp sun jul 23 11:26:16 pdt 2000 i686 unknown '
config_args='-ds -e -A optimize=-g'
hint=previous, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='cc', optimize='-O2 -g', gccversion=pgcc-2.91.66 19990314 (egcs-1.1.2 release)
cppflags='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
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, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=/lib/libc-2.1.1.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.6.0:
/home/jfriedl/lib/perl
/home/jfriedl/lib/perl/yahoo
/usr/local/lib/perl5/5.6.0/i686-linux
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl
.
---
Environment for perl v5.6.0:
HOME=/home/jfriedl
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH=/usr/local/pgsql/lib:/home/jfriedl/src/rvplayer5.0
LOGDIR (unset)
PATH=/home/jfriedl/bin:/home/jfriedl/common/bin:/usr/local/gcc-2.95.2/bin:.:/usr/local/pgsql/bin:/usr/local/bin:/usr/X11R6/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/jfriedl/src/rvplayer5.0
PERLLIB=/home/jfriedl/lib/perl:/home/jfriedl/lib/perl/yahoo
PERL_BADLANG (unset)
SHELL=/bin/tcsh
Thread Next
-
[ID 20000729.003] segfault with (??{ qr/blah/ })
by Jeffrey Friedl