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

autodie causes normally successful open with 4 arguments to die #10448

Closed
p5pRT opened this issue Jun 18, 2010 · 4 comments
Closed

autodie causes normally successful open with 4 arguments to die #10448

p5pRT opened this issue Jun 18, 2010 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 18, 2010

Migrated from rt.perl.org#75854 (status was 'rejected')

Searchable as RT75854$

@p5pRT
Copy link
Author

p5pRT commented Jun 18, 2010

From @hoelzro

This is a bug report for perl from rob@​hoelzro.net,
generated with the help of perlbug 1.36 running under perl 5.10.0.


The following (normally non-problematic) code fails, and I'm pretty
sure it shouldn't​:

use autodie qw(open);
my $pipe;
open $pipe', '-|', 'ls', '-l';

The message is​:

Internal error​: open(GLOB(0x1859c50), -|, ls, -l)​: Do not expect to get
4 arguments at (eval 6) line 126.

This bug is present on Perl 5.10.0, but I wrote a test and ran it
against a Perl built from Git (HEAD is
c35588e). Here is the test​:

use strict;
use warnings;

use Test​::More tests => 2;

my $pipe;
my $pid = open $pipe, '-|', 'ls', '-l';
ok($pid, '4-argument piped open returns a PID');
close $pipe;

eval {
  use autodie qw(open);
  open $pipe, '-|', 'ls', '-l';
  close $pipe;
};
ok(! $@​, '4-argument open normally succeeds, but now dies');

I "fixed" some code to get it working, but it caused another test
(relating to backwards compatibility of Fatal​::fill_protos) to fail. I
thought I'd get this in RT sooner rather than later, and then I'd try
to fix the bug myself.

Thanks,
Rob Hoelz



Flags​:
  category=library
  severity=medium


This perlbug was built using Perl 5.10.0 in the Fedora build system.
It is being executed now by Perl 5.10.0 - Tue Dec 1 10​:20​:45 EST 2009.

Site configuration information for perl 5.10.0​:

Configured by Red Hat, Inc. at Tue Dec 1 10​:20​:45 EST 2009.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration​:
  Platform​:
  osname=linux, osvers=2.6.18-164.2.1.el5,
archname=x86_64-linux-thread-multi uname='linux
x86-5.fedora.phx.redhat.com 2.6.18-164.2.1.el5 #1 smp mon sep 21
04​:37​:42 edt 2009 x86_64 x86_64 x86_64 gnulinux ' config_args='-des
-Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-Accflags=-DPERL_USE_SAFE_PUTENV -Dversion=5.10.0
-Dmyhostname=localhost -Dperladmin=root@​localhost -Dcc=gcc -Dcf_by=Red
Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr/local
-Dprivlib=/usr/lib/perl5/5.10.0
-Dsitelib=/usr/local/lib/perl5/site_perl/5.10.0
-Dvendorlib=/usr/lib/perl5/vendor_perl/5.10.0
-Darchlib=/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi
-Dsitearch=/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
-Dvendorarch=/usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
-Dinc_version_list=none -Darchname=x86_64-linux-thread-multi
-Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Duseshrplib -Dusethreads
-Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db
-Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio
-Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly
-Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto
-Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto
-Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto
-Dscriptdir=/usr/bin -Dotherlibdirs=/usr/lib/perl5/site_perl'
hint=recommended, useposix=true, d_sigaction=define useithreads=define,
usemultiplicity=define useperlio=define, d_sfio=undef,
uselargefiles=define, usesocks=undef use64bitint=define,
use64bitall=define, uselongdouble=undef usemymalloc=n,
bincompat5005=undef Compiler​: cc='gcc', ccflags ='-D_REENTRANT
-D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing
-pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm', optimize='-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic', cppflags='-D_REENTRANT
-D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing
-pipe -I/usr/local/include -I/usr/include/gdbm' ccversion='',
gccversion='4.4.2 20091027 (Red Hat 4.4.2-7)', 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='gcc', ldflags ='' libpth=/usr/local/lib64 /lib64 /usr/lib64
libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=,
so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.11'
Dynamic Linking​: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags='-Wl,-E
-Wl,-rpath,/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic'

Locally applied patches​:
 


@​INC for perl 5.10.0​:
  /home/rhoelz/useful-perl/lib
  lib
  /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
  /usr/local/lib/perl5/site_perl/5.10.0
  /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
  /usr/lib/perl5/vendor_perl/5.10.0
  /usr/lib/perl5/vendor_perl
  /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi
  /usr/lib/perl5/5.10.0
  /usr/lib/perl5/site_perl
  .


Environment for perl 5.10.0​:
  HOME=/home/rhoelz
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/rhoelz/perl5/perlbrew/bin​:/home/rhoelz/perl5/perlbrew/perls/current/bin​:/home/rhoelz/perl5/perlbrew/bin​:/home/rhoelz/perl5/perlbrew/perls/current/bin​:/usr/lib64/qt-3.3/bin​:/usr/kerberos/sbin​:/usr/kerberos/bin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/local/sbin​:/usr/sbin​:/sbin​:/home/rhoelz/useful-perl/scripts​:/home/rhoelz/useful-perl/scripts
  PERL5LIB=/home/rhoelz/useful-perl/lib​:lib
  PERL_BADLANG (unset)

@p5pRT
Copy link
Author

p5pRT commented Jul 23, 2010

From @iabyn

On Fri, Jun 18, 2010 at 08​:07​:31AM -0700, Robert Hoelz wrote​:

The following (normally non-problematic) code fails, and I'm pretty
sure it shouldn't​:

use autodie qw(open);
my $pipe;
open $pipe', '-|', 'ls', '-l';

The message is​:

Internal error​: open(GLOB(0x1859c50), -|, ls, -l)​: Do not expect to get
4 arguments at (eval 6) line 126.

Thanks for the report (and sorry for the tardy reply), but the autodie
module is primarily maintained by its author outside of the perl core, so
you'll need to report it using the CPAN RT system rather than the perl
one.

From the autodie pod​:

  REPORTING BUGS

  Please report bugs via the CPAN Request Tracker at
  http​://rt.cpan.org/NoAuth/Bugs.html?Dist=autodie.

--
Red sky at night - gerroff my land!
Red sky at morning - gerroff my land!
  -- old farmers' sayings #14

@p5pRT
Copy link
Author

p5pRT commented Jul 23, 2010

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 23, 2010

@iabyn - Status changed from 'open' to 'rejected'

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