[K/N] Debug tool for checking state at call points of unknown functions

After linking runtime, llvm-ir is modified to add checker function
call at all points where unknown function, which can possibly run long
is called. This function checks Native state is set, to avoid long locks
at gc.
This commit is contained in:
Pavel Kunyavskiy
2021-06-17 18:15:20 +03:00
committed by Space
parent 1ba04fdd21
commit fc75486611
11 changed files with 624 additions and 6 deletions
@@ -107,6 +107,9 @@ extern "C" void DeinitMemory(MemoryState* state, bool destroyRuntime) {
// TODO: Also make sure that finalizers are run.
}
mm::ThreadRegistry::Instance().Unregister(node);
if (destroyRuntime) {
mm::ThreadRegistry::ClearCurrentThreadData();
}
}
extern "C" void RestoreMemory(MemoryState*) {