Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG all] 'die qr{pattern}' does not check termination #2931

Closed
p5pRT opened this issue Dec 2, 2000 · 7 comments
Closed

[BUG all] 'die qr{pattern}' does not check termination #2931

p5pRT opened this issue Dec 2, 2000 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 2, 2000

Migrated from rt.perl.org#4821 (status was 'stalled')

Searchable as RT4821$

@p5pRT
Copy link
Author

p5pRT commented Dec 2, 2000

From @vanstyn

With 5.6.0 for example​:
  crypt% perl -we 'die qr{x}'
  (?-xism​:x)crypt%
should be the same as​:
  crypt% perl -we 'die "(?-xism​:x)"'
  (?-xism​:x) at -e line 1.
  crypt%

Hugo


Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration​:
  Platform​:
  osname=linux, osvers=2.2.5-16, archname=i686-linux
  uname='linux crypt.compulink.co.uk 2.2.5-16 #1 sun may 30 23​:00​:18 bst 1999 i686 unknown '
  config_args='-des -Doptimize=-g -O6 -Dprefix=/opt/perl-5.6.0'
  hint=recommended, 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='-g -O6', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
  cppflags='-DDEBUGGING -fno-strict-aliasing'
  ccflags ='-DDEBUGGING -fno-strict-aliasing -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'

Characteristics of this binary (from libperl)​:
  Compile-time options​: DEBUGGING USE_LARGE_FILES
  Built under linux
  Compiled at Mar 23 2000 10​:55​:56
  @​INC​:
  /opt/perl-5.6.0/lib/5.6.0/i686-linux
  /opt/perl-5.6.0/lib/5.6.0
  /opt/perl-5.6.0/lib/site_perl/5.6.0/i686-linux
  /opt/perl-5.6.0/lib/site_perl/5.6.0
  /opt/perl-5.6.0/lib/site_perl
  .

@p5pRT
Copy link
Author

p5pRT commented Dec 9, 2000

From @simoncozens

On Sun, Dec 03, 2000 at 05​:16​:40AM +0000, Hugo wrote​:

With 5.6.0 for example​:
crypt% perl -we 'die qr{x}'
(?-xism​:x)crypt%
should be the same as​:
crypt% perl -we 'die "(?-xism​:x)"'
(?-xism​:x) at -e line 1.
crypt%

Inline Patch
--- ../utfperl/pp_sys.c Sat Dec  9 17:19:05 2000
+++ pp_sys.c    Sun Dec 10 00:54:32 2000
@@ -448,7 +448,7 @@
     }
     else {
        tmpsv = TOPs;
-       tmps = SvROK(tmpsv) ? Nullch : SvPV(tmpsv, len);
+       tmps = (SvROK(tmpsv) && PL_in_eval) ? Nullch : SvPV(tmpsv, len);
     }
     if (!tmps || !len) {
        SV *error = ERRSV;

@p5pRT p5pRT closed this as completed Nov 28, 2003
@p5pRT
Copy link
Author

p5pRT commented Jul 25, 2012

From @nwc10

On Sat Dec 02 12​:13​:26 2000, hv@​crypt.compulink.co.uk wrote​:

With 5.6.0 for example​:
crypt% perl -we 'die qr{x}'
(?-xism​:x)crypt%
should be the same as​:
crypt% perl -we 'die "(?-xism​:x)"'
(?-xism​:x) at -e line 1.
crypt%

With 5.8.1 for example

$ ~/Sandpit/581/bin/perl -e 'die qr{x}'
(?-xism​:x)$

contrast with 5.8.0

$ ~/Sandpit/580/bin/perl -e 'die qr{x}'
(?-xism​:x) at -e line 1.
$

so this certainly isn't *resolved*, which was its status in RT.
(It might, however, effectively be rejected)

The fix for this bug was reversed in commit bf12611, due
to bug #17763.

See this comment from Hugo in
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=17763#txn-40043

: I'm not sure how we can improve on this. The best suggestion I can come
: up with off the top of my head is to attach the error location information
: via magic, and let util.c​:vdie() extract it; but that wouldn't cater for
: those that want the upgraded string for other purposes, such as for
syslog().

It's not clear how to resolve both #17763 and #4821 at the same time.

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented Jul 25, 2012

@nwc10 - Status changed from 'resolved' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 4, 2016

From @dcollinsn

This is broken in blead, marking stalled. TODO test will be forthcoming.

@p5pRT
Copy link
Author

p5pRT commented Jul 4, 2016

From [Unknown Contact. See original ticket]

This is broken in blead, marking stalled. TODO test will be forthcoming.

@p5pRT
Copy link
Author

p5pRT commented Jul 4, 2016

@dcollinsn - Status changed from 'open' to 'stalled'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant