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

Make sure debug callback is kept alive #257

Merged
merged 1 commit into from
Oct 10, 2023
Merged

Conversation

grovesNL
Copy link
Owner

Fixes #256

See comment for why we don't store the debug callback as Box<Box<dyn FnMut(...)>> directly - tl;dr is that aliasing isn't fully defined for Box so we can't guarantee that the raw pointer we pass out is still valid once it's being aliased during the callback.

@grovesNL grovesNL force-pushed the improve-debug-callback branch from e3a51ab to b4c991c Compare October 10, 2023 17:33
@grovesNL
Copy link
Owner Author

cc @epimeletes

@grovesNL grovesNL merged commit d62451c into main Oct 10, 2023
12 checks passed
@grovesNL grovesNL deleted the improve-debug-callback branch October 10, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is debug_message_callback sound?
1 participant