-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Refactor: deduplicate "can this unwind?" logic #65303
Comments
I'm not sure this sort of implementation work is within the purview of the unwind-FFI project charter, but I agree with you that the refactor and fix should happen. |
With #76570 having landed, these two functions are in sync again, so there might again be a potential for code deduplication. I did not yet take a closer look though. |
Hi! I would be happy to investigate this and fix it if possible. 🙂 |
@alexcrichton does your PR #86155 also solve this? It sounds a bit like it does, since I think |
Ah yes that PR would indeed close this. I removed the |
@alexcrichton your PR changed since you first posted it; does it still close this issue in the form that now landed? |
I believe so, yes, there's only one deduction location in the compiler now for whether a function can unwind or not. |
Currently, we have two separate codepaths to decide if a function needs an abort-on-panic shim and if it gets the
nounwind
attribute. This risks them getting out of sync -- and indeed they are out-of-sync right now, but there's lots of opposition to fix that critical bug, so I closed #63884. But I still think that refactor should happen eventually, hence this issue. That PR, as well as #63909, also have some testcases that could be added once a proper solution has been implemented.Cc @BatmanAoD (not sure who else is in the team for this)
The text was updated successfully, but these errors were encountered: