develooper Front page | perl.perl5.porters | Postings from July 2012

[perl #73474] fwrite will segfault if stream is null

Thread Previous | Thread Next
From:
Leon Timmermans via RT
Date:
July 5, 2012 04:28
Subject:
[perl #73474] fwrite will segfault if stream is null
Message ID:
rt-3.6.HEAD-28836-1341487691-919.73474-15-0@perl.org
On Tue Mar 09 15:42:51 2010, cbratcher wrote:
> The following works (but does not print "bar") in perlio.  But will
> segfault if you set PERLIO to stdio.
> 
> perl -le 'print "foo"; binmode ":pop"; binmode ":pop"; print "bar";'
> 
> This appears to've been a bug as far back as 5.8.0.
> perlbug seems to be missing -u...  so I'll add the patch in
> rt.perl.org

That code is binmoding the filehandle *{":pop"}, instead of STDOUT as
you probably intended, which makes it hard for us to reproduce your bug.

The same code using binmode STDOUT, ":pop" doesn't segfault for me on
anything I tried.

Leon

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=73474

Thread Previous | Thread Next


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