Skip to content

Commit

Permalink
Avoid ubsan error in accessing action parameters (#1268)
Browse files Browse the repository at this point in the history
Fixes #1230

Signed-off-by: Jiwon Kim <kjw6855@gmail.com>
  • Loading branch information
kjw6855 authored Sep 11, 2024
1 parent 359aeea commit 199af48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bm_sim/actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ ActionFnEntry::execute(Packet *pkt) const {
(primitive.get_source_info() == nullptr) ? "(no source info)"
: primitive.get_source_info()->get_source_fragment());
param_offset = primitive.get_param_offset();
primitive.execute(&state, &(action_fn->params[param_offset]));
primitive.execute(&state, action_fn->params.data() + param_offset);
idx = primitive.get_jump_offset(idx);
}
}
Expand Down

0 comments on commit 199af48

Please sign in to comment.