Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Support RE2 regular expression engine #1650

Open
ricea opened this issue Aug 16, 2023 · 0 comments
Open

[FR] Support RE2 regular expression engine #1650

ricea opened this issue Aug 16, 2023 · 0 comments

Comments

@ricea
Copy link
Member

ricea commented Aug 16, 2023

Is your feature request related to a problem? Please describe.
When given an invalid regular expression, Chromium perftests using this library crash.

This is because Chromium compiles google_benchmark with std::regex and with exceptions disabled, and so there's no way for it to recover from a regular expression parsing error.

Describe the solution you'd like
When given an invalid regular expression, an error should be reported and no benchmarks should be run.

The Chromium project already incorporates the re2 regular expression library, so if it was possible for the embedder to provide the re2 engine then this problem could be solved.

Describe alternatives you've considered
Chromium could use the POSIX regex library, but it wouldn't work on Windows. Chromium could use the POSIX regex library on non-Windows platforms, but then behaviour would differ between platforms, which causes a lot of problems.

Additional context
N/A

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

No branches or pull requests

1 participant