Skip to content

Commit

Permalink
Assert that tbl_idx is always within range
Browse files Browse the repository at this point in the history
  • Loading branch information
eightbitraptor committed Oct 8, 2024
1 parent a6dc540 commit 6db4589
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3293,6 +3293,8 @@ rb_gc_vm_weak_tbl_iter(vm_tbl_iter_callback_func cb, vm_tbl_update_callback_func
{
rb_vm_t *vm = GET_VM();

GC_ASSERT(tbl_idx <= ALL_VM_WEAK_TABLES);

struct global_vm_tbl_iter_data iter_data = {
.callback = cb,
.update_callback = ucb,
Expand Down

0 comments on commit 6db4589

Please sign in to comment.