develooper Front page | perl.perl5.porters | Postings from June 2010

Re: [perl #75628] setsockopt() with fileno($s) as first parameter makes perl segfault

Thread Previous
From:
Nicholas Clark
Date:
June 10, 2010 01:36
Subject:
Re: [perl #75628] setsockopt() with fileno($s) as first parameter makes perl segfault
Message ID:
20100610083631.GY31795@plum.flirble.org
Thanks for the bug report.
On Wed, Jun 09, 2010 at 01:56:07PM +0000, Ævar Arnfjörð Bjarmason wrote:
> On Wed, Jun 9, 2010 at 12:41, michael+perl@stapelberg.de
> <perlbug-followup@perl.org> wrote:
> > perl -MIO::Socket -E 'my $s = IO::Socket->new(); $s->socket(2, 1, 6); setsockopt(fileno($s), 1, 1, 1);'
> 
> That's just "Bad symbol for filehandle at -e line 1." in 5.12 and 5.13.1

git bisect shows that it was fixed with be4a20f47dbbaec8

commit be4a20f47dbbaec8334ad2c20e898e8d6f2adb65
Author: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
Date:   Thu Aug 6 22:12:47 2009 +0200

    Make gv_IOadd accept a NULL argument

    This fixes bug #68182


This change was too late to make it into perl 5.10.1, so that release will
also have this bug.

Is the code above sufficiently generic that it would make a good (portable)
regression test? A test for #68182 was added in 735302bdcf24a4dd

Nicholas Clark

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About