Skip to content

runtime: recover does not correctly recover from panic #43921

Closed
@mdempsky

Description

@mdempsky

This program should exit normally, but it currently exits with a panic: https://play.golang.org/p/XnJ41HvD9Gw

It exits normally when compiled with gccgo or with -gcflags=-N. Notably, it does not crash with the alternative code I suggested at https://go-review.googlesource.com/c/go/+/286712/1/src/runtime/panic.go#1038. (Discovered this by accident while trying to test gccgo instead and happened to still have that test code patched into my local tree.)

/cc @danscales @randall77

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions