fix incorrect module lookup on asan events; fix bad string size assumption with const string eval

This commit is contained in:
Ryan Fleury committed 2026-08-21 11:35:41 -07:00
1 parent 03463abebc
commit d75ea2d55e
2 files changed
+5 -11

No files matched your search

+1 -9
View File
@@ -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
+4 -2
View File
@@ -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: