-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
What version of Go are you using (go version)?
go version go1.13 linux/amd64
Does this issue reproduce with the latest release?
Yes
What did you do?
package main
import "fmt"
func demo() {
defer func() {
defer func() {
// recover panic 2
fmt.Println("panic", recover(), "is recovered")
}()
// recover panic 1
defer fmt.Println(" (done).")
defer recover()
defer fmt.Print("To recover panic 1 ...")
defer fmt.Println("now, two active panics coexist")
panic(2) // If this line is commented out, then the program will not crash.
}()
panic(1)
}
func main() {
demo()
}What did you expect to see?
Not crash.
What did you see instead?
Crashes.
mdempsky and mcdoker18
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.