global match data and context
rurban opened this issue · comments
Reini Urban commented
See PR #18 for the data part, #6 for the context parts.
There are two independent global contexts: compile and match.
#18 regressed in one t/perl/regexp.t
test. 1840 with an uninitialized stack element st.reg_sv.
# check we have the right utf8ness as we switch back and forth between
# patterns
^(\x{100}|a)(??{ qr/.?\xF7/d}) a_\xF7 y - -
sometimes this even gives an regexp memory corruption
error in the #18 branch match-data-comp-alloc, sometimes also corrupted regexp pointers
. Wrong restauration of st.reg_sv after the nested codeblock fallback.
asan reports a heap-buffer-overflow in S_regmatch.
Reini Urban commented
Merged Avar's match part #18 with 0.14,
accepting the single regression and memory corruption.