summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-11-03 06:01:19 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-11-04 22:45:30 -0800
commit2e880be705313389843cfb10a460d634e9d54ce7 (patch)
tree9c3f7f245c2ffd632fe564d986146b537dfa9e2f /perly.y
parent8b3001cd63527bb84d5852d1174805737a474abf (diff)
downloadperl-2e880be705313389843cfb10a460d634e9d54ce7.tar.gz
Stop char classes from leaking
Since 5.10.0, this script has leaked: $ perl -e 'warn$$; while(1){eval "/[:]/"}' What exactly has leaked has changed over time. In bleadperl it is this: SV = PV(0x8033c8) at 0x836170 REFCNT = 1 FLAGS = () PV = 0x31c0b0 "\2\0\0\0\377\377\377\377\0\0\0\0\f\fS\21\1\0\0\0:\0\0\0;\0\0\0"\0 CUR = 28 LEN = 32 This only happens when the character class has only one character in it, the same character repeated ([aa]), or a multicharacter fold. A character class is usually compiled as an ANYOF node, but [A] is optimised down to just A (and EXACT) and /[\xdf]/i is rewritten into a more complex expression. When the ANYOF node is abandoned, we need to free any temporary SVs created in the mean time. A few of them were leaking.
Diffstat (limited to 'perly.y')
0 files changed, 0 insertions, 0 deletions