Gracefully handle already removed objects - #104
Conversation
…bjects in NormObjectTable::Remove
bebopagogo
left a comment
There was a problem hiding this comment.
Is this the root cause of the issue that was initially reported regarding the ProtoTree issue? I.e., during shutdown incomplete objects are aborted and removed which races with user API calls to Remove()? I'm trying to understand the sequence of events. For NORM_OBJECT_DATA, it may be important the API notifications work cleanly to allow for release of attached memory allocations ... I am approving this but taking a self action to review that to see if there is a race condition I need to fix above and beyond this safety measure
|
Maybe not, I may have chased the wrong rabbit. I think |
Fixes #81.
Adds a safety check to
NormObjectTable::Removein theUSE_PROTO_TREEimplementation to verify that the object exists in the tree before attempting removal.When a user calls
NormObjectCancelon an object already aborted internally by the NORM protocol, it will now gracefully returnfalserather than crashing via atree.Findassertion or risking a use-after-free.