UserspaceEmulator: Skip destroying the Emulator object on shutdown

There are some destruction order races that can cause hangs while
shutting down UE. Since there's no particular value right now in
destroying the Emulator object properly, just avoid destruction and
add a FIXME about looking into it later.
This commit is contained in:
Andreas Kling 2020-11-14 23:39:44 +01:00
commit 647e92b74f
Notes: sideshowbarker 2024-07-19 01:23:27 +09:00

View file

@ -68,7 +68,8 @@ int main(int argc, char** argv, char** env)
environment.append(env[i]);
}
UserspaceEmulator::Emulator emulator(arguments, environment, move(elf));
// FIXME: It might be nice to tear down the emulator properly.
auto& emulator = *new UserspaceEmulator::Emulator(arguments, environment, move(elf));
if (!emulator.load_elf())
return 1;