summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2018-01-18 15:27:25 +0000
committerDavid Mitchell <davem@iabyn.com>2018-01-18 18:19:56 +0000
commit847fe5626cf3eeafbd2b7b31f7b89607d29451c2 (patch)
tree24e3fb4e7ceefa89fadf894e9a31925556d47c73 /pad.c
parent523d71b314dc75bd212794cc8392eab8267ea744 (diff)
downloadperl-847fe5626cf3eeafbd2b7b31f7b89607d29451c2.tar.gz
perl -Dr: avoid coredump in \1
When displaying each reg node being executed, the code that dumps a REF node assumed that a capture was valid if progs->offs[n].start != -1. In fact during backtracking after a failure, a capture is "undone" by merely setting progs->offs[n].end = -1. So make the dump code account for that too. This was causing a test in t/re/pat.t to coredump: use re qw(Debug EXECUTE); "x" =~ m{ () y | () \1 }x; Although given that neither the test nor the REF code in regprop() have changed recently, I'm not sure why this has only recently started crashing.
Diffstat (limited to 'pad.c')
0 files changed, 0 insertions, 0 deletions