mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-14 10:10:11 -08:00
fix incorrect module lookup on asan events; fix bad string size assumption with const string eval
This commit is contained in:
1 parent
03463abebc
commit
d75ea2d55e
2 files changed
+5
-11
No files matched your search
@@ -3031,15 +3031,7 @@ d_ctrl_thread__next_dmn_event(Arena *arena, DMN_CtrlCtx *ctrl_ctx, D_Msg *msg, D
|
||||
Access *access = access_open();
|
||||
D_Handle process_handle = d_handle_from_dmn(D_MachineID_Local, ev->process);
|
||||
D_Entity *process = d_entity_from_handle(process_handle);
|
||||
D_Entity *module = &d_entity_nil;
|
||||
for(D_Entity *child = process->first; child != &d_entity_nil; child = child->next)
|
||||
{
|
||||
if(child->kind == D_EntityKind_Module)
|
||||
{
|
||||
module = child;
|
||||
break;
|
||||
}
|
||||
}
|
||||
D_Entity *module = d_module_from_process_vaddr(process, ev->instruction_pointer);
|
||||
if(module != &d_entity_nil)
|
||||
{
|
||||
// rjf: determine base address of asan shadow space
|
||||
|
||||
@@ -402,8 +402,10 @@ e_interpret(String8 bytecode)
|
||||
|
||||
case RDI_EvalOp_ConstString:
|
||||
{
|
||||
MemoryCopy(&nval, ptr, imm.u64);
|
||||
ptr += imm.u64;
|
||||
U64 src_size = imm.u64;
|
||||
U64 dst_size = Min(sizeof(nval), src_size);
|
||||
MemoryCopy(&nval, ptr, dst_size);
|
||||
ptr += src_size;
|
||||
}break;
|
||||
|
||||
case RDI_EvalOp_Abs:
|
||||
|
||||
Reference in new issue
Block a user