Skip to content

re2: add compiled_ check to AllMatches and AllPotentials#614

Open
MarkLee131 wants to merge 1 commit intogoogle:mainfrom
MarkLee131:fix/filtered-re2-compiled-check
Open

re2: add compiled_ check to AllMatches and AllPotentials#614
MarkLee131 wants to merge 1 commit intogoogle:mainfrom
MarkLee131:fix/filtered-re2-compiled-check

Conversation

@MarkLee131
Copy link
Copy Markdown

Fix #613:

FirstMatch() checks the compiled_ flag and logs DFATAL if Compile() has not been called. AllMatches() and AllPotentials() lack this check.

This is consistent with the fix in commit 1250a99 (issue #484), where Filter.Match() in the Python bindings was changed to raise an error instead of crashing when called before Compile().

Add the same guard to AllMatches() and AllPotentials().

FirstMatch() checks the compiled_ flag and logs DFATAL if Compile()
has not been called. AllMatches() and AllPotentials() lack this check.

This is consistent with the fix in commit 1250a99 (issue google#484), where
Filter.Match() in the Python bindings was changed to raise an error
instead of crashing when called before Compile().

Add the same guard to AllMatches() and AllPotentials().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: FilteredRE2::AllMatches and AllPotentials missing compiled_ check

1 participant