Skip Menu |
Report information
Id: 120835
Status: resolved
Priority: 0/
Queue: perl5

Owner: tonyc <tony [at] develop-help.com>
Requestors: yaberger [at] ca.ibm.com
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: (no value)
Type: (no value)
Perl Version: (no value)
Fixed In: (no value)



From: yaberger [...] ca.ibm.com
Date: Fri, 20 Dec 2013 13:44:54 -0500
Subject: IO::Socket getsockopt subroutine on AIX
To: perlbug [...] perl.org
Download (untitled) / with headers
text/plain 3.6k
This is a bug report for perl from yaberger@ca.ibm.com, generated with the help of perlbug 1.39 running under perl 5.18.1. ----------------------------------------------------------------- [Please describe your issue here] Hi, I've compiled my own Perl 5.18.1 on AIX 7.1 TL2 SP3 with IBM XL C/C++ v12.1.0.5 I've installed a few additional modules and one of them failed a test. I've reported the error encountered: https://groups.google.com/forum/#!topic/mojolicious/T34XZX72LaA After a few tests, we've been able to target the issue in the getsockopt() subroutine of IO::Socket. It seems that this subroutine does not meet the condition to unpack on AIX while it should do it. I've opened a ticket against IO::Socket: https://rt.cpan.org/Public/Bug/Display.html?id=91183 However, it seems that IO::Socket is now considered as part of Perl5 core and therefore this is why I'm opening this ticket today. Best regards, Yannick Bergeron Advisory IT Specialist [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=library severity=low module=IO::Socket --- Site configuration information for perl 5.18.1: Configured by yaberge3 at Thu Dec 5 07:20:48 EST 2013. Summary of my perl5 (revision 5 version 18 subversion 1) configuration: Platform: osname=aix, osvers=7.1.0.0, archname=aix-thread-multi uname='aix aix71tst 1 7 00c0eca24c00 ' config_args='-desr -Dprefix=/usr/local/perl-5.18.1 -Uman1direxp -Uman3direxp -Doptimize=-O2 -Duselongdoubles -Dusethreads' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc -q32', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES', optimize='-O2', cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT' ccversion='12.1.0.5', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='ld', ldflags =' -brtl -bdynamic -b32 -bmaxdata:0x80000000' libpth=/lib /usr/lib /usr/ccs/lib libs=-lbind -lnsl -ldbm -ldl -lld -lm -lcrypt -lpthreads -lc perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lpthreads -lc libc=, so=a, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -bE:/usr/local/perl-5.18.1/lib/5.18.1/aix-thread-multi/CORE/perl.exp' cccdlflags=' ', lddlflags='-bhalt:4 -G -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -bnoentry -lpthreads -lc -lm' Locally applied patches: --- @INC for perl 5.18.1: /usr/local/perl-5.18.1/lib/site_perl/5.18.1/aix-thread-multi /usr/local/perl-5.18.1/lib/site_perl/5.18.1 /usr/local/perl-5.18.1/lib/5.18.1/aix-thread-multi /usr/local/perl-5.18.1/lib/5.18.1 . --- Environment for perl 5.18.1: HOME=/home/root/ LANG=en_US LANGUAGE (unset) LC__FASTMSG=true LD_LIBRARY_PATH (unset) LIBPATH (unset) LOGDIR (unset) PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java7/jre/bin:/sbin:/home/root/:/usr/local/bin:/usr/sbin/acct:/opt/IBM/ITM/bin PERL_BADLANG (unset) SHELL=/usr/bin/ksh
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 713b
https://groups.google.com/forum/#!topic/mojolicious/T34XZX72LaA John K. patch looks good but can you test it? pp_sys.c: case OP_GSOCKOPT: SvGROW(sv, 257); (void)SvPOK_only(sv); SvCUR_set(sv,256); *SvEND(sv) ='\0'; len = SvCUR(sv); if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0) goto nuts2; SvCUR_set(sv, len); *SvEND(sv) ='\0'; PUSHs(sv); break; => if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0) goto nuts2; #if defined(_AIX) if (len == 256) len = sizeof(int); #endif SvCUR_set(sv, len); ... -- Reini Urban
To: perlbug-followup [...] perl.org
Subject: Re: [perl #120835] IO::Socket getsockopt subroutine on AIX
Date: Mon, 23 Dec 2013 15:32:16 -0500
From: yaberger [...] ca.ibm.com
Hi,

I've tested it and it works.
Is it too late to get this in 5.18.2?
If so, could this be added for 5.18.3 and 5.19/5.20?


Best regards,

Yannick Bergeron
Advisory IT Specialist




From:         "Reini Urban via RT" <perlbug-followup@perl.org>
To:         Yannick Y Bergeron/Bromont/IBM@IBMCA,
Date:         12/21/2013 12:44 PM
Subject:         [perl #120835] IO::Socket getsockopt subroutine on AIX




https://groups.google.com/forum/#!topic/mojolicious/T34XZX72LaA

John K. patch looks good but can you test it?

pp_sys.c:
    case OP_GSOCKOPT:
        SvGROW(sv, 257);
        (void)SvPOK_only(sv);
        SvCUR_set(sv,256);
        *SvEND(sv) ='\0';
        len = SvCUR(sv);
        if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0)
            goto nuts2;
        SvCUR_set(sv, len);
        *SvEND(sv) ='\0';
        PUSHs(sv);
        break;
=>
    if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0)
       goto nuts2;
  #if defined(_AIX)
    if (len == 256)
       len = sizeof(int);
  #endif
    SvCUR_set(sv, len);
    ...
--
Reini Urban


To: perlbug-followup [...] perl.org
Subject: [perl #120835] IO::Socket getsockopt subroutine on AIX
Date: Tue, 24 Dec 2013 08:44:36 -0500
From: yaberger [...] ca.ibm.com
Hi,

I've tested it and it works.
Is it too late to get this in 5.18.2?
If so, could this be added for 5.18.3 and 5.19/5.20?


Best regards,

Yannick Bergeron
Advisory IT Specialist




From:         "Reini Urban via RT" <perlbug-followup@perl.org>
To:         Yannick Y Bergeron/Bromont/IBM@IBMCA,
Date:         12/21/2013 12:44 PM
Subject:         [perl #120835] IO::Socket getsockopt subroutine on AIX




https://groups.google.com/forum/#!topic/mojolicious/T34XZX72LaA

John K. patch looks good but can you test it?

pp_sys.c:
    case OP_GSOCKOPT:
        SvGROW(sv, 257);
        (void)SvPOK_only(sv);
        SvCUR_set(sv,256);
        *SvEND(sv) ='\0';
        len = SvCUR(sv);
        if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0)
            goto nuts2;
        SvCUR_set(sv, len);
        *SvEND(sv) ='\0';
        PUSHs(sv);
        break;
=>
    if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0)
       goto nuts2;
  #if defined(_AIX)
    if (len == 256)
       len = sizeof(int);
  #endif
    SvCUR_set(sv, len);
    ...
--
Reini Urban


Date: Mon, 13 Jan 2014 07:31:51 -0500
To: perlbug-followup [...] perl.org
Subject: [perl #120835] IO::Socket getsockopt subroutine on AIX
From: yaberger [...] ca.ibm.com
Download (untitled) / with headers
text/plain 218b
Hi,

Is it possible to get the attention of a Perl porter who could commit this change so it could be part of the next Perl releases ? (5.18.3, 5.19.x, 5.20.x)


Best regards,

Yannick Bergeron
Advisory IT Specialist
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 375b
On Mon Jan 13 04:32:14 2014, yaberger@ca.ibm.com wrote: Show quoted text
> Is it possible to get the attention of a Perl porter who could commit this > change so it could be part of the next Perl releases ? (5.18.3, 5.19.x, > 5.20.x)
I've added it to the 5.18.3 blockers to be reviewed. Meanwhile, this needs review for 5.20.0 as well, and I'll flag it for that too in a moment. -- rjbs
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 566b
On Mon Feb 10 14:55:06 2014, rjbs wrote: Show quoted text
> On Mon Jan 13 04:32:14 2014, yaberger@ca.ibm.com wrote:
> > Is it possible to get the attention of a Perl porter who could commit > > this > > change so it could be part of the next Perl releases ? (5.18.3, > > 5.19.x, > > 5.20.x)
> > I've added it to the 5.18.3 blockers to be reviewed. > > Meanwhile, this needs review for 5.20.0 as well, and I'll flag it for > that too in a moment.
Essentially this change was applied as ee2276e59a3c027cb89c721d866c9db4ba683a7b by jhi. I vote to backport to 5.20, any others? Tony
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 740b
On Wed Oct 22 21:14:39 2014, tonyc wrote: Show quoted text
> On Mon Feb 10 14:55:06 2014, rjbs wrote:
> > On Mon Jan 13 04:32:14 2014, yaberger@ca.ibm.com wrote:
> > > Is it possible to get the attention of a Perl porter who could > > > commit > > > this > > > change so it could be part of the next Perl releases ? (5.18.3, > > > 5.19.x, > > > 5.20.x)
> > > > I've added it to the 5.18.3 blockers to be reviewed. > > > > Meanwhile, this needs review for 5.20.0 as well, and I'll flag it for > > that too in a moment.
> > Essentially this change was applied as > ee2276e59a3c027cb89c721d866c9db4ba683a7b by jhi. > > I vote to backport to 5.20, any others?
Makes sense to me. (I actually understand it, believe it or not.) +1. -- Father Chrysostomos
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 291b
On Wed Oct 22 21:14:39 2014, tonyc wrote: Show quoted text
> > Essentially this change was applied as > ee2276e59a3c027cb89c721d866c9db4ba683a7b by jhi. > > I vote to backport to 5.20, any others? > > Tony
+1 - though that's from someone with no experience with AIX -- James E Keenan (jkeenan@cpan.org)
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 375b
On Thu Oct 23 15:55:48 2014, jkeenan wrote: Show quoted text
> On Wed Oct 22 21:14:39 2014, tonyc wrote:
> > > > Essentially this change was applied as > > ee2276e59a3c027cb89c721d866c9db4ba683a7b by jhi. > > > > I vote to backport to 5.20, any others? > > > > Tony
> > +1 - though that's from someone with no experience with AIX
Thank you. Done in e8ac1ac10. -- Father Chrysostomos


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org