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

Add weak_ptr<void> callback_lifetime to SubscriptionOptions #2725

Draft
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

ewak
Copy link

@ewak ewak commented Jan 12, 2025

Avoid potential use after free usage of a registered subscription callback function by allowing user to specify a weak_ptr to be checked for
expiry before the associated subscription callback is called.

If user does not specify callback_lifetime,
the mechanism falls back to a tracking the lifetime of a user specified callback_group, failing that it tracks the lifetime of the nodes default_callback_group.

Avoid potential use after free usage of a registered
subscription callback function by allowing user to
specify a weak_ptr to be checked for
expiry before the associated subscription callback is called.

If user does not specify callback_lifetime,
the mechanism falls back to a tracking the lifetime
of a user specified callback_group, failing that it
tracks the lifetime of the nodes default_callback_group.

Signed-off-by: Mike Wake <[email protected]>
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.

1 participant