Closed gavanderhoorn closed 3 years ago
I'm not familiar enough with how TopicManager
is used, nor with C++03 object constructions specifics.
But re-reading the issue, and assuming it works more or less like Java (does or used to), I am more inclined towards crash.
Example scenario:
TopicManager::instance()
; it is not initialized, and the thread enters the mutex.TopicManagerPtr topic_manager
(object not constructed).TopicManager::instance()
and sees it assigned.TopicManager::start()
, which tries to access the shutting_down_mutex_
field.Yes, I agree, your analysis makes sense.
I'm going to move it to the Crashing theme.
Looking into the behavioural theme, I noticed ros_comm/ca23e58 is marked as interesting.
Whether it would fit the behavioural theme or not depends a bit on whether we expect the unsafe double-checked locking identified by @git-afsantos in https://github.com/ros/ros_comm/issues/770 is more likely to result in crashes or corruption / undefined behaviour.
(for crashes we have the Crashing theme)
@git-afsantos: would you remember?