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

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

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

mdempsky opened this issue Jan 26, 2021 · 3 comments
Assignees
Labels

Comments

@mdempsky
Copy link
Member

@mdempsky mdempsky commented Jan 26, 2021

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
Copy link
Member Author

@mdempsky mdempsky commented Jan 26, 2021

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

@danscales danscales commented Jan 27, 2021

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

@gopherbot gopherbot commented Oct 14, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants