summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2016-10-31 20:22:37 +0100
committerYves Orton <demerphq@gmail.com>2016-11-01 13:29:48 +0100
commit5585e758ec847fcd75936b77096edf5234d6e0c0 (patch)
tree1067e5d69b4a4ffc029abad8b9afce586b5aa91e /cpan
parent27deb0cf05ad74bec9ea0da3d1b6405346a66401 (diff)
downloadperl-5585e758ec847fcd75936b77096edf5234d6e0c0.tar.gz
rework perl #129903 - inf recursion from use of empty pattern in regex codeblock
FC didn't like my previous patch for this issue, so here is the one he likes better. With tests and etc. :-) The basic problem is that code like this: /(?{ s!!! })/ can trigger infinite recursion on the C stack (not the normal perl stack) when the last successful pattern in scope is itself. Since the C stack overflows this manifests as an untrappable error/segfault, which then kills perl. We avoid the segfault by simply forbidding the use of the empty pattern when it would resolve to the currently executing pattern. I imagine with a bit of effort someone can trigger the original SEGV, unlike my original fix which forbade use of the empty pattern in a regex code block. So if someone actually reports such a bug we might have to revert to the older approach of prohibiting this.
Diffstat (limited to 'cpan')
0 files changed, 0 insertions, 0 deletions