nayakgi / perl-compiler

Automatically exported from code.google.com/p/perl-compiler
Other
0 stars 0 forks source link

Wrong COW length with 5.18 #372

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
t/CORE/comp/colon.t
fails since 5.18 with a Perl_sv_setsv_cow assert(SvCUR(sstr)+1 < SvLEN(sstr))

Fixed by overallocating each static string to at least word alignment. 

Note: perl 5.18-5.21.3 itself has a broken overallocation scheme for short 
strings 
(that's why perl5.20.1 disabled COW as performance regression),
because it allocates 10 byte instead of 8 for short strings len < 6.
We use 8 byte instead.

Fixed with 1.51_02

Original issue reported on code.google.com by reini.urban on 27 Aug 2014 at 4:16