mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
fix deadlock in launch_and_init - don't hold dbgi scopes open too aggressively, as we may need to eliminate dbgi which they refer to.
This commit is contained in:
@@ -1931,7 +1931,6 @@ ctrl_thread__launch_and_init(CTRL_Msg *msg)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
DBGI_Scope *scope = dbgi_scope_open();
|
||||
|
||||
//- rjf: launch
|
||||
OS_LaunchOptions opts = {0};
|
||||
@@ -2016,6 +2015,8 @@ ctrl_thread__launch_and_init(CTRL_Msg *msg)
|
||||
// rjf: done with handshake -> ready to find entry point. search launched processes
|
||||
case DEMON_EventKind_HandshakeComplete:
|
||||
{
|
||||
DBGI_Scope *scope = dbgi_scope_open();
|
||||
|
||||
// rjf: find entry point vaddr
|
||||
for(U64 process_idx = 0; process_idx < run_ctrls.run_entity_count; process_idx += 1)
|
||||
{
|
||||
@@ -2187,6 +2188,8 @@ ctrl_thread__launch_and_init(CTRL_Msg *msg)
|
||||
stop_event = event;
|
||||
}
|
||||
}
|
||||
|
||||
dbgi_scope_close(scope);
|
||||
}break;
|
||||
}
|
||||
}
|
||||
@@ -2232,7 +2235,6 @@ ctrl_thread__launch_and_init(CTRL_Msg *msg)
|
||||
ctrl_c2u_push_events(&evts);
|
||||
}
|
||||
|
||||
dbgi_scope_close(scope);
|
||||
scratch_end(scratch);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user