Skip to content
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

runtime: fatal error: bad defer entry in panic #43920

Closed
mdempsky opened this issue Jan 26, 2021 · 3 comments
Closed

runtime: fatal error: bad defer entry in panic #43920

mdempsky opened this issue Jan 26, 2021 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mdempsky
Copy link
Member

This program fatal errors with "bad defer entry in panic": https://play.golang.org/p/7XxRTDqaeZh

FWIW, it also fatal errors with CL 286712.

/cc @danscales

@mdempsky mdempsky added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 26, 2021
@mdempsky
Copy link
Member Author

github.com/mdempsky/deferfuzz is running into this issue for about 1 in 100 runs. So I've got a bunch of extra test cases if they're useful. They're not minimized though. (I manually minimized the Go playground link above.)

Also, /cc @randall77

@mdempsky mdempsky changed the title runtime: bad defer entry in panic runtime: fatal error: bad defer entry in panic Jan 26, 2021
@danscales danscales self-assigned this Jan 27, 2021
@danscales
Copy link
Contributor

I've taken a look and this looks more complex to fix. I may need to do record more info to know exactly which open-coded defer entries to remove and not remove when a recovery happens (which may be in a regular panic or a recursive panic).

It is not a regression (also broken in 1.15). So, I will keep taking a look at it, but I don't think it needs to be fixed for 1.16 release that is very soon.

@gopherbot
Copy link

Change https://golang.org/cl/356011 mentions this issue: cmd/compile: fix some defer bugs

@dmitshur dmitshur added this to the Go1.18 milestone Oct 29, 2021
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants