-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area/xdshelp wantedNeeds help!Needs help!investigatePotential bug that needs verificationPotential bug that needs verification
Description
Title: Potential Dangling Reference in On Demand VHDS
Description:
In the call stack of on-demand vhds, this pointer is captured in the callback lambda.
subscription_->updateOnDemand(alias);
In the statement above, subscription_ is actually a reference to a shared pointer, whose lifetime is dynamic. If it has been destroyed before the callback is run in main thread, this will become a dangling reference and the program may crash. I suggest capturing a weak_ptr in the closure for safety.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/xdshelp wantedNeeds help!Needs help!investigatePotential bug that needs verificationPotential bug that needs verification