Front page | perl.perl5.porters |
Postings from February 2007
[perl #41521] Fix for IO::Socket send method
Thread Previous
From:
Todd C. Miller
Date:
February 16, 2007 11:49
Subject:
[perl #41521] Fix for IO::Socket send method
Message ID:
rt-3.6.HEAD-24617-1171654005-819.41521-75-0@perl.org
# New Ticket Created by "Todd C. Miller"
# Please include the string: [perl #41521]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41521 >
This is a bug report for perl from Todd.Miller@courtesan.com,
generated with the help of perlbug 1.35 running under perl v5.8.8.
-----------------------------------------------------------------
[Please enter your report here]
The IO::Socket send() method returns "Cannot determine peer address"
for Unix domain socket son OpenBSD due to a missing defined().
Linux does not exhibit this behavior, presumably due to differences
in struct sockaddr_un.
The following patch to Socket.pm version 1.30 fixes the problem.
- todd
--- perl/ext/IO/lib/IO/Socket.pm Tue Jun 13 15:29:07 2006
+++ perl/ext/IO/lib/IO/Socket.pm Fri Feb 16 13:59:58 2007
@@ -250,7 +218,7 @@
my $peer = $_[3] || $sock->peername;
croak 'send: Cannot determine peer address'
- unless($peer);
+ unless(defined($peer));
my $r = defined(getpeername($sock))
? send($sock, $_[1], $flags)
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=library
severity=medium
---
Site configuration information for perl v5.8.8:
Configured by root at Thu Jan 1 0:00:00 UTC 1970.
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=openbsd, osvers=4.0, archname=i386-openbsd
uname='openbsd'
config_args='-dsE -Dopenbsd_distribution=defined'
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='cc', ccflags ='-fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -I/usr/local/include',
optimize='-O2',
cppflags='-fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -I/usr/local/include'
ccversion='', gccversion='3.3.5 (propolice)', gccosandvers='openbsd4.0'
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='cc', ldflags ='-Wl,-E '
libpth=/usr/lib
libs=-lm -lutil -lc
perllibs=-lm -lutil -lc
libc=/usr/lib/libc.so.40.3, so=so, useshrplib=true, libperl=libperl.so.10.1
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-R/usr/libdata/perl5/i386-openbsd/5.8.8/CORE'
cccdlflags='-DPIC -fPIC ', lddlflags='-shared -fPIC '
Locally applied patches:
---
@INC for perl v5.8.8:
/usr/libdata/perl5/i386-openbsd/5.8.8
/usr/local/libdata/perl5/i386-openbsd/5.8.8
/usr/libdata/perl5
/usr/local/libdata/perl5
/usr/local/libdata/perl5/site_perl/i386-openbsd
/usr/libdata/perl5/site_perl/i386-openbsd
/usr/local/libdata/perl5/site_perl
/usr/libdata/perl5/site_perl
/usr/local/lib/perl5/site_perl
.
---
Environment for perl v5.8.8:
HOME=/home/millert
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/millert/bin/OpenBSD.i386:/home/millert/bin:/home/millert/bin/scripts:/usr/local/gnu/bin:/usr/local/bin:/usr/local/sbin:/usr/local/etc:/usr/local/rcs/bin:/usr/local/nmh/bin:/usr/local/news/bin:/usr/local/emacs/bin:/usr/local/netpbm/bin:/usr/local/mtools/bin:/usr/local/netscape/bin:/usr/local/ghostscript/bin:/usr/local/frame-5.5.6/bin:/usr/local/teTeX/bin:/usr/local/cvs-1.10.1/bin:/usr/local/games/bin:/usr/local/archivers/bin:/usr/local/skey/bin:/usr/local/audio/bin:/usr/local/rtty/bin:/bin:/sbin:/usr/games:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/X11R6/bin:/usr/bonsaitools/bin:/usr/local/bin:/usr/obj/bin:/usr/src/bin
PERL_BADLANG (unset)
SHELL=/usr/local/bin/tcsh
Thread Previous