develooper Front page | perl.perl5.porters | Postings from August 2003

[perl #23576] valgrind errors for /(?{})/ in t/op/pat.t

Thread Next
From:
Nicholas Clark
Date:
August 25, 2003 12:51
Subject:
[perl #23576] valgrind errors for /(?{})/ in t/op/pat.t
Message ID:
rt-23576-63696.18.9000683974423@rt.perl.org
# New Ticket Created by  Nicholas Clark 
# Please include the string:  [perl #23576]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23576 >


This is a bug report for perl from nick@ccl4.org,
generated with the help of perlbug 1.34 running under perl v5.8.1.

-----------------------------------------------------------------
[Please enter your report here]

The first 2 valgrind errors on t/op/pat.t boil down to this.
They're from the two (? constructions starting at column 8.

#!./perl

@a = 1 .. 2;

m/
	(?{ 0 })
	(?(?{ 0 })
	 )	
   /x;

# bug is during compile time
BEGIN {exit;}
__END__

==27761== Invalid read of size 2
==27761==    at 0x80FFC29: Perl_sv_compile_2op (pp_ctl.c:2666)
==27761==    by 0x80A24B2: S_reg (regcomp.c:2239)
==27761==    by 0x80A467E: S_regatom (regcomp.c:2845)
==27761==    by 0x80A3AAA: S_regpiece (regcomp.c:2622)
==27761==    Address 0x413A2CE8 is 16 bytes inside a block of size 32 free'd
==27761==    at 0x40026C15: free (vg_replace_malloc.c:220)
==27761==    by 0x80B0628: Perl_safesysfree (util.c:143)
==27761==    by 0x8089B9A: Perl_op_free (op.c:334)
==27761==    by 0x8089B31: Perl_op_free (op.c:321)
==27761==
==27761== Invalid read of size 2
==27761==    at 0x80FFC29: Perl_sv_compile_2op (pp_ctl.c:2666)
==27761==    by 0x80A24B2: S_reg (regcomp.c:2239)
==27761==    by 0x80A2855: S_reg (regcomp.c:2286)
==27761==    by 0x80A467E: S_regatom (regcomp.c:2845)
==27761==    Address 0x413A2CE8 is 16 bytes inside a block of size 32 free'd
==27761==    at 0x40026C15: free (vg_replace_malloc.c:220)
==27761==    by 0x80B0628: Perl_safesysfree (util.c:143)
==27761==    by 0x8089B9A: Perl_op_free (op.c:334)
==27761==    by 0x8089B31: Perl_op_free (op.c:321)

Nicholas Clark

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl v5.8.1:

Configured by nick at Sun Aug 24 14:04:58 BST 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
  Platform:
    osname=linux, osvers=2.4.20, archname=i686-linux
    uname='linux penfold.unixbeard.net 2.4.20 #1 sat apr 5 03:15:50 bst 2003 i686 gnulinux '
    config_args='-Dusedevel=y -Dcc=ccache gcc -Dld=gcc -Ubincompat5005 -Uinstallusrbinperl -Dcf_email=nick@ccl4.org -Dperladmin=nick@ccl4.org -Dinc_version_list=  -Dinc_version_list_init=0 -Doptimize=-g -Dusethreads=n -Dinstallman1dir=none -Dinstallman3dir=none -Dprefix=/usr/local/perl5.8.1-snap20863 -de'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='ccache gcc', ccflags ='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-g',
    cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.3.2 20030812 (Debian prerelease)', 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='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    MAINT20844

---
@INC for perl v5.8.1:
    lib
    /usr/local/perl5.8.1-snap20863/lib/5.8.1/i686-linux
    /usr/local/perl5.8.1-snap20863/lib/5.8.1
    /usr/local/perl5.8.1-snap20863/lib/site_perl/5.8.1/i686-linux
    /usr/local/perl5.8.1-snap20863/lib/site_perl/5.8.1
    /usr/local/perl5.8.1-snap20863/lib/site_perl
    .

---
Environment for perl v5.8.1:
    HOME=/home/nick
    LANG=C
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/nick/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11/bin:/usr/contrib/bin:/usr/games:/usr/sbin:/usr/ucb:/sbin:/usr/etc:/data3/src/emacs/bin/i386-unknown-bsdi2.1/
    PERL_BADLANG (unset)
    SHELL=/bin/bash




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About