bonefish+mmlr:
As (our) gcc unfortunately uses atexit() to clean up lazily initialized static variables inside functions we have to ensure that we do the right thing with unloadable shared objects. In case a shared object was unloaded that installed an atexit() hook the application would crash on exit. We now implement a callback into libroot that is used to call all the atexit() hooks of a component that is to be unloaded. Most prominently this fixes the media_server crash at shutdown. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23486 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -41,6 +41,8 @@ struct rld_export {
|
||||
|
||||
status_t (*reinit_after_fork)();
|
||||
|
||||
void (*call_atexit_hooks_for_range)(addr_t start, addr_t size);
|
||||
|
||||
const struct user_space_program_args *program_args;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user