-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
regex: enable safe handling of invalid UTF-8 by default #39524
Conversation
In the 10 years since this list was written, there are new options. I have left a few disabled in the list if I was not sure if they made sense in our context.
UTF | ||
|
||
# arguments to pcre2_set_newline | ||
const COMPILE_NEWLINE_MASK = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seemed like someone wanted them in a list, so I kept them here
Any performance cost? |
We have some really good @nanosoldier |
Something went wrong when running your job:
|
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @christopher-dG |
Seems safe to say this is well within the noise, as the benchmarks that include a regex explicitly (as opposed to using them from somewhere else, like Base.Filesystem) are:
|
Will merge soon, unless any objections |
I object. |
Ah, sorry, I assumed you were in favor of this from past discussions. What's your objection? |
This is an improvement but my understanding is that this treats |
No, you're thinking of the other issue. This doesn't change the match string interpretation. This simply sets the flag to disable UB in pcre2 when the searched string isn't valid utf8. |
No description provided.