Hi I have one question in exit(). Why is the __libc_exit_fini executed after __funcs_on_exit? If some finalized functions in .fini_array access global variables which is registered by __cxa_atexit and will be release in __funcs_on_exit, we may run into some crash during __libc_exit_fini executaion. _Noreturn void exit(int code) { __funcs_on_exit(); __libc_exit_fini(); __stdio_exit(); _Exit(code); } In bionic, I found the fini_array functions may be registered at the last before we execute main function and called firstly in exit(before global variables release) . Its order looks like completely opposite to musl. __noreturn void __libc_init(void* raw_args, void (*onexit)(void) __unused, int (*slingshot)(int, char**, char**), structors_array_t const * const structors) { ...... if (structors->fini_array) { __cxa_atexit(__libc_fini,structors->fini_array,nullptr); } ...... exit(slingshot(args.argc - __libc_shared_globals()->initial_linker_arg_count, args.argv + __libc_shared_globals()->initial_linker_arg_count, args.envp)); } Best Li