# New Ticket Created by Robert Hoelz
# Please include the string: [perl #75854]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75854 >

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
c35588eb09d732b01769aad7cf303e81b9417302). 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.

Rob Hoelz
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:
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
-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
-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
-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,
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:

Environment for perl 5.10.0:
LANGUAGE (unset)
LOGDIR (unset)

Search Discussions

  • Dave Mitchell at Jul 23, 2010 at 3:39 pm

    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

    From the autodie pod:


    Please report bugs via the CPAN Request Tracker at

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
postedJun 18, '10 at 3:07p
activeJul 23, '10 at 3:39p

2 users in discussion

Dave Mitchell: 1 post Robert Hoelz: 1 post



site design / logo © 2022 Grokbase