Skip to content

IO::Socket getsockopt on AIX [rt.cpan.org #91183] #17437

Open
@toddr

Description

@toddr

Migrated from rt.cpan.org#91183 (status was 'new')

Requestors:

From [email protected] on 2013-12-04 20:02:30:

Hi,

I've compiled Perl 5.18.1 which is bundled with IO::Socket 1.36 on AIX 7.1 
TL2 SP3.
The following configure command has been used to compile Perl: /usr/bin/sh 
./Configure -desr -Dprefix=/usr/local/perl-5.18.1 -Uman1direxp 
-Uman3direxp -Doptimize=-O2 -Duselongdoubles -Dusethreads

After that, I've tried to install a module named Mojolicious at version 
4.58 in which a test fail in t/mojo/daemon.t
The test is opening a socket without SO_REUSEPORT and validate with a 
getsockopt that it's not set.
It's expecting a false boolean but doesn't get one.
Our investigation brought us into IO/Socket.pm in subroutine getsockopt() 
on this condition:
    $r = unpack("i", $r)
        if(defined $r && length($r) == $intsize);
$r is defined andhas a length of 256
$intsize value is 4 so it's not unpacked and return something that is not 
a false boolean.
If I force unpack("i", $r), the value returned is 0 and the test pass.

Question: How can we explain that the length of $r is not $intsize? Would 
this require a change in IO::Socket Perl module or in my Perl compilation 
procedure or somewhere else?

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


Best regards,

Yannick Bergeron
450 534-7711
[email protected]
Advisory IT Specialist

Metadata

Metadata

Assignees

No one assigned

    Labels

    dist-IOissues in the dual-life blead-first IO distributiondistro-aix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions