develooper Front page | perl.perl5.porters | Postings from May 2013

Re: [perl #114878] Regular Expression matching in signal handlercauses side-effects

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
May 8, 2013 15:02
Subject:
Re: [perl #114878] Regular Expression matching in signal handlercauses side-effects
Message ID:
20130508150144.GA29691@cancer.codesimply.com
* Dave Mitchell <davem@iabyn.com> [2013-05-08T09:21:48]
> Just to confirm what you are saying: that the OP's bug report code on
> your *blead* causes the panic shown above?

Yes.

Karl and I were playing with variants on this problem yesterday evening.

If I run the program included in the ticket and send it HUP a few times, I see:

  HUP
  HUP
  panic: sv_chop ptr=7fcb23c011d9, start=7fcb23c05b20, end=7fcb23c05b30 at test line 13.

This is avoided if I drop the s/// from the handler or the loop, and if I add a
sleep to the loop.  Dropping the m// does not seem to matter.  In other words,
it seems quite likely to me that "if we leave a s/// to enter a handler that
also does a s///, panic ensues."

  This is perl 5, version 18, subversion 0 (v5.18.0 (v5.17.11-110-g9d055c6)) built for darwin-2level

That's why I asked about Nick's fix: to get this panic address.

Summary of my perl5 (revision 5 version 18 subversion 0) configuration:
  Commit id: 9d055c6596c43e1078ddc578f9f2db2e49e8b167
  Platform:
    osname=darwin, osvers=12.3.0, archname=darwin-2level
    uname='darwin walrus.local 12.3.0 darwin kernel version 12.3.0: sun jan 6 22:37:10 pst 2013; root:xnu-2050.22.13~1release_x86_64 x86_64 '
    config_args='-de -Dprefix=/Users/rjbs/perl5/perlbrew/perls/18.0-RC0 -Dusedevel -Aeval:scriptdir=/Users/rjbs/perl5/perlbrew/perls/18.0-RC0/bin'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include',
    optimize='-O3',
    cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
    ccversion='', gccversion='4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.57))', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /usr/lib
    libs=-lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    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 -L/usr/local/lib -L/opt/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_SAWAMPERSAND
                        PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT
                        USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
                        USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
                        USE_PERL_ATOF
  Locally applied patches:
  RC0
  Built under darwin
  Compiled at May  7 2013 10:45:52
  %ENV:
    PERLBREW_BASHRC_VERSION="0.61"
    PERLBREW_HOME="/Users/rjbs/.perlbrew"
    PERLBREW_MANPATH="/Users/rjbs/perl5/perlbrew/perls/18.0-RC0/man"
    PERLBREW_PATH="/Users/rjbs/perl5/perlbrew/bin:/Users/rjbs/perl5/perlbrew/perls/18.0-RC0/bin"
    PERLBREW_PERL="18.0-RC0"
    PERLBREW_ROOT="/Users/rjbs/perl5/perlbrew"
    PERLBREW_VERSION="0.61"
    PERLDOC="-n/opt/local/bin/groff"
    PERL_AUTOINSTALL="--skipdeps"
    PERL_MAILERS="sendmail:/Users/rjbs/bin/sendmail"
  @INC:
    /Users/rjbs/perl5/perlbrew/perls/18.0-RC0/lib/site_perl/5.18.0/darwin-2level
    /Users/rjbs/perl5/perlbrew/perls/18.0-RC0/lib/site_perl/5.18.0
    /Users/rjbs/perl5/perlbrew/perls/18.0-RC0/lib/5.18.0/darwin-2level
    /Users/rjbs/perl5/perlbrew/perls/18.0-RC0/lib/5.18.0
    .


-- 
rjbs

Thread Previous | 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