Could this be intended behavior, returning -8 rather than hang for an unwanted amount of time? The change isn't mentioned in versions.txt so it wouldn't appear so. The same behavior is seen when using $regsub
The -8 might stand for the PCRE_ERROR_MATCHLIMIT, which is a return value from pcre_exec()
that means the recursion and backtracking limit was reached.
The example you used to showcase the bug report has some serious backtracking, which might explain it. I get it on any pattern with extreme backtracking, fex: