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

HINT_BLOCK_SCOPE leaking at run time with perl 5.12-5.14 on Windows

Thread Next
From:
Vincent Pit
Date:
September 20, 2012 14:57
Subject:
HINT_BLOCK_SCOPE leaking at run time with perl 5.12-5.14 on Windows
Message ID:
505B913B.6000700@profvince.com
Does anyone know why

    perl -le "print sub { (caller 0)[8] }->()"

prints 256 on Windows with perl 5.12, but 0 with 5.10.1?

That 256 is the HINT_BLOCK_SCOPE hint which, if I understand correctly, 
is used to make do { ... } blocks into "real" blocks as soon as they 
contain at least two statements (if there's only one, the block is 
optimized away). This is purely a compile-time hint and it should not be 
visible at run-time, which is indeed the case on linux for all versions 
of perl.

 From the cpantesters reports I got for one of my modules, I also 
suspect it prints 256 with 5.14 and 0 with 5.16, but I haven't checked 
myself.

The only idea I can think of is that the op slab allocator is enabled by 
default on Windows, and that it had some kind of bug that caused that 
hint to be preserved.


Vincent

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