You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue occurs when a user tries to drop a zenoh entity in atexit or std::signal. This is also the case in rmw_zenoh_cpp. To resolve this issue, we might need to add a compilation flag to turn off the z_drop in the destructor.
Maybe instead of atexit, we could use a static variable that will call all drop logic in its destructor, at least this guaranteed by C++ standard to work correctly. No apparently it is the same as calling function registered with atexit.
There are some (a lot of) system APIs that should not be called in signal handlers, so it is really a bad idea to drop big objects in signal handlers. Moreover, signal handler can be executed concurrently, so thread safety also comes into place. We need to handle signals in a safe way, I can take this task
There are some (a lot of) system APIs that should not be called in signal handlers, so it is really a bad idea to drop big objects in signal handlers. Moreover, signal handler can be executed concurrently, so thread safety also comes into place. We need to handle signals in a safe way, I can take this task
Yes. I agree with your point. Dropping objects within signal handlers isn't a good pattern. Rust has put much effort into addressing this safely within the normal scope.
Description
This issue occurs when a user tries to drop a zenoh entity in
atexit
orstd::signal
. This is also the case in rmw_zenoh_cpp. To resolve this issue, we might need to add a compilation flag to turn off thez_drop
in the destructor.To reproduce
Error log
System Info
The text was updated successfully, but these errors were encountered: