Skip to content

runtime: [recovered, repanicked] is displayed for duplicated panics that not recovered. #76099

@fengyoulin

Description

@fengyoulin

Go version

go version go1.25.3 linux/amd64

Output of go env in your module/workspace:

GOVERSION='go1.25.3'

What did you do?

package main

var e any = "error message"

func main() {
        defer func() {
                panic(e)
        }()
        panic(e)
}

What did you see happen?

panic: error message [recovered, repanicked]

goroutine 1 [running]:
main.main.func1()
        /home/kylin/work/dupanic.go:7 +0x25
panic({0x475b00?, 0x501ba0?})
        /home/kylin/.golang/go1.25.3/src/runtime/panic.go:783 +0x132
main.main()
        /home/kylin/work/dupanic.go:9 +0x3e

What did you expect to see?

panic: error message

goroutine 1 [running]:
main.main.func1()
        /home/kylin/work/dupanic.go:7 +0x25
panic({0x475b00?, 0x501ba0?})
        /home/kylin/.golang/go1.25.3/src/runtime/panic.go:783 +0x132
main.main()
        /home/kylin/work/dupanic.go:9 +0x3e

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions