Hi The unwind code initializes an object_mutex, but it is never destroyed. On VxWorks 5 at least, that's a problem, because it means that module load+unload leaks a resource. I don't know about other VxWorks versions.
I'm wondering what the best fix is (insofar as upstream gcc wants to fix it, we've used an out-of-tree patch for the past few years, and can continue to do that). One option is to destroy it right after the __gthread_mutex_unlock() call in __deregister_frame_info_bases(), but that assumes that _Unwind_Find_FDE can no longer get called at that point (which is true?). We could make it dependent on the target's gthr header file defining a __GTHREAD_MUTEX_DESTROY_FUNCTION macro as an indication that the target has some non-trivial work to do for destroying a mutex. Rasmus