tre
tre copied to clipboard
Attempt to fix flaw causing R bug 15012
The R bug report is here.
Also reproducible with:
echo "" | agrep -e '\\)'
The patched version passes make check
, and agrep
is able to finish quickly with this test pattern (and not consume all available memory). As I'm not too familiar with the TRE internals, I hope this doesn't cause other bugs.
Looks like we've independently discovered the same bug. Issue #50 is a duplicate of this. I think your patch is reasonable, but I'm also unfamiliar with TRE's internals.
Tomas Kalibera just applied the same fix (except different whitespace, no meaningless parentheses) in the development version of R. His analysis is included as a comment in the R bug report. See the fix in Winston Chang's GitHub mirror of the R source.
Merged by hand (together with PR#57) in commit 3702f071. Thank you!