-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/compile: change status of "bad iterator" panic
Execution of the loop body previously either terminated the iteration (returned false because of a break, goto, or return) or actually panicked. The check against abi.RF_READY ensures that the body can no longer run and also panics. This CL in addition transitions the loop state to abi.RF_PANIC so that if this already badly-behaved iterator defer-recovers this panic, then the exit check at the loop context will catch the problem and panic there. Previously, panics triggered by attempted execution of a no-longer active loop would not trigger a panic at the loop context if they were defer-recovered. Change-Id: Ieeed2fafd0d65edb66098dc27dc9ae8c1e6bcc8c Reviewed-on: https://go-review.googlesource.com/c/go/+/625455 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Tim King <taking@google.com>
- Loading branch information
Showing
2 changed files
with
142 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters