-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
regexp: add ErrNestingDepth error #51684
Comments
This proposal has been added to the active column of the proposals project |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
Change https://go.dev/cl/384617 mentions this issue: |
The proposed changed was
while the actual change uses
Was that intentional? Also, there was a suggestion by Rob Pike to use
|
I agree, this was not resolved to my satisfaction. Did something get missed? |
Change https://go.dev/cl/401076 mentions this issue: |
Sent https://go.dev/cl/401076. |
Also update the file in $GOROOT/api/next to use proposal number. For #51684 Change-Id: I28bfa6bc1cee98a17b13da196d41cda34d968bb0 Reviewed-on: https://go-review.googlesource.com/c/go/+/401076 Reviewed-by: Rob Pike <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
Change https://go.dev/cl/401854 mentions this issue: |
The proposal accepted the name ErrNestingDepth. For #51684 Change-Id: I702365f19e5e1889dbcc3c971eecff68e0b08727 Reviewed-on: https://go-review.googlesource.com/c/go/+/401854 Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Rob Pike <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
The fix for #51112 introduced a nesting depth check in the regexp parser.
To avoid adding new API, the fix returns ErrInternalError on regexps that are too deeply nested.
For Go 1.19 we want to give this error a proper value with a good message.
I propose to add a new ErrorCode:
The code change is in CL 384617.
The text was updated successfully, but these errors were encountered: