Fix surface drop order.#6997
Merged
cwfitzgerald merged 3 commits intogfx-rs:trunkfrom Jan 27, 2025
ed-2100:fix_surface_drop_order
Merged
Fix surface drop order.#6997cwfitzgerald merged 3 commits intogfx-rs:trunkfrom ed-2100:fix_surface_drop_order
cwfitzgerald merged 3 commits intogfx-rs:trunkfrom
ed-2100:fix_surface_drop_order
Conversation
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
cwfitzgerald
approved these changes
Jan 27, 2025
Member
cwfitzgerald
left a comment
There was a problem hiding this comment.
Let's merge this as this seems more correct, and if there are any issues in practice revisit if needed.
davnotdev
pushed a commit
to davnotdev/wgpu
that referenced
this pull request
Mar 4, 2025
* Fix surface drop order. * Add changes to changelog. * Update SAFETY note. Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com> --------- Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Contributor
|
I take it this did not make its way into 24.0.2? I'm still getting segfaults, wanted to make sure the fix just didn't land. |
Member
|
Yeah, it's not been backported yet - I think this is worth backporting still, I'll see if I can do this today. |
cwfitzgerald
added a commit
that referenced
this pull request
Mar 19, 2025
* Fix surface drop order. * Add changes to changelog. * Update SAFETY note. Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com> --------- Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connections
Fixes #4650
Description
If
Surfaceis constructed with anArc<Window>reference and no other strong references are present when theSurfaceis deconstructed, wayland will segfault.This is because the drop order of
Surfacespecifies that_handle_sourcebe dropped beforeinner.This is fixed by reordering the struct such that
_handle_sourceis dropped last.Testing
Explain how this change is tested.
Checklist
cargo fmt.taplo format.cargo clippy.CHANGELOG.md. See simple instructions inside file.