mirror of
https://github.com/ptitSeb/box64.git
synced 2025-10-14 02:38:54 +08:00
[DYNACACHE] Allow Dynacache to be serialized when _exit is used
This commit is contained in:
@@ -4875,6 +4875,7 @@ wrappedlibc:
|
||||
- __cxa_pure_virtual
|
||||
- __stack_chk_fail
|
||||
- vFi:
|
||||
- _exit
|
||||
- exit
|
||||
- vFp:
|
||||
- _ITM_deregisterTMCloneTable
|
||||
|
@@ -118,6 +118,7 @@ typedef int32_t (*iFppipppp_t)(void*, void*, int32_t, void*, void*, void*, void*
|
||||
GO(_Jv_RegisterClasses, vFv_t) \
|
||||
GO(__cxa_pure_virtual, vFv_t) \
|
||||
GO(__stack_chk_fail, vFv_t) \
|
||||
GO(_exit, vFi_t) \
|
||||
GO(exit, vFi_t) \
|
||||
GO(_ITM_deregisterTMCloneTable, vFp_t) \
|
||||
GO(_ZGTtdlPv, vFp_t) \
|
||||
|
@@ -3877,7 +3877,19 @@ EXPORT void my_exit(x64emu_t* emu, int code)
|
||||
exit(code);
|
||||
}
|
||||
|
||||
EXPORT void my__exit(x64emu_t* emu, int code) __attribute__((alias("my_exit")));
|
||||
EXPORT void my__exit(x64emu_t* emu, int code)
|
||||
{
|
||||
if(emu->flags.quitonexit || emu->quit) {
|
||||
_exit(code);
|
||||
}
|
||||
printf_log(LOG_INFO, "Fast _exit called\n");
|
||||
emu->quit = 1;
|
||||
box64_exit_code = code;
|
||||
SerializeAllMapping(); // just to be safe
|
||||
// then call all the fini
|
||||
|
||||
_exit(code);
|
||||
}
|
||||
|
||||
EXPORT int my_prctl(x64emu_t* emu, int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5)
|
||||
{
|
||||
|
@@ -352,7 +352,7 @@ GOM(execv, iFEpp)
|
||||
GOM(execve, iFEppp)
|
||||
GOM(execvp, iFEpp)
|
||||
GOWM(execvpe, iFEppp)
|
||||
GO(_exit, vFi)
|
||||
GOM(_exit, vFEi)
|
||||
GOM(exit, vFEi)
|
||||
GOW(_Exit, vFi)
|
||||
GO(explicit_bzero, vFpL)
|
||||
|
Reference in New Issue
Block a user