mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 13:28:40 +00: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();
|
ProfBeginFunction();
|
||||||
Temp scratch = scratch_begin(0, 0);
|
Temp scratch = scratch_begin(0, 0);
|
||||||
DBGI_Scope *scope = dbgi_scope_open();
|
|
||||||
|
|
||||||
//- rjf: launch
|
//- rjf: launch
|
||||||
OS_LaunchOptions opts = {0};
|
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
|
// rjf: done with handshake -> ready to find entry point. search launched processes
|
||||||
case DEMON_EventKind_HandshakeComplete:
|
case DEMON_EventKind_HandshakeComplete:
|
||||||
{
|
{
|
||||||
|
DBGI_Scope *scope = dbgi_scope_open();
|
||||||
|
|
||||||
// rjf: find entry point vaddr
|
// rjf: find entry point vaddr
|
||||||
for(U64 process_idx = 0; process_idx < run_ctrls.run_entity_count; process_idx += 1)
|
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;
|
stop_event = event;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dbgi_scope_close(scope);
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2232,7 +2235,6 @@ ctrl_thread__launch_and_init(CTRL_Msg *msg)
|
|||||||
ctrl_c2u_push_events(&evts);
|
ctrl_c2u_push_events(&evts);
|
||||||
}
|
}
|
||||||
|
|
||||||
dbgi_scope_close(scope);
|
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
ProfEnd();
|
ProfEnd();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user