xslate / p5-Text-Xslate

Scalable template engine for Perl5
https://metacpan.org/release/Text-Xslate
Other
121 stars 47 forks source link

fix a segfault on array join #200

Closed zanyou closed 5 years ago

zanyou commented 5 years ago

related to #199. When dealing with long arrays (about 123 elements), EXTEND() macro changes SP but MARK hasn't changed. Causes segfault because MARK keeps pointing to the old stack. MEXTEND () do Same thing as EXTEND (), but update mark register too.

skaji commented 5 years ago

@charsbar Could you review this PR?

charsbar commented 5 years ago

@zanyou, @skaji MEXTEND is not a public perl api (that means, it's not listed in Devel::PPPort and perldoc perlapi shows no entry for it), though it's been defined and used in the Perl core at least since Perl 5.004. If this PR can be rewritten with dORIGMARK, ORIGMARK, and MARK without notable penalty, I assume that would be better because they are public apis. Otherwise, it looks good to me.

skaji commented 5 years ago

@zanyou @charsbar Thanks! Released https://metacpan.org/release/SKAJI/Text-Xslate-v3.5.7