Fixed #9946: ret_ptr uninitialized in init_atomic_func, fini_atomic_func