mirror of
https://github.com/ARMSX2/ARMSX3.git
synced 2026-08-24 16:58:52 -07:00
CPUThread: fix ASAN use-after-free
This commit is contained in:
@@ -729,8 +729,14 @@ void cpu_thread::operator()()
|
||||
{
|
||||
if (_this)
|
||||
{
|
||||
sys_log.warning("CPU Thread '%s' terminated abnormally!", name);
|
||||
cleanup();
|
||||
|
||||
auto log_thread = named_thread("CPU Thread Cleanup Logger", [name = name]()
|
||||
{
|
||||
sys_log.warning("CPU Thread '%s' terminated abnormally!", name);
|
||||
});
|
||||
|
||||
log_thread();
|
||||
}
|
||||
}
|
||||
} cleanup;
|
||||
|
||||
Reference in New Issue
Block a user