Skip to content

Commit 310837d

Browse files
committed
Fix handling of bins when updating dedup st_table
The code didn't take ENTRY_BASE into account, and deleted wrong entries.
1 parent dcd46bd commit 310837d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

st.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -2394,7 +2394,11 @@ rb_mmtk_st_update_dedup_table(st_table *tab)
23942394
// Delete bins that point to deleted entries.
23952395
for (st_index_t ind = 0; ind < num_bins; ind++) {
23962396
st_index_t bin = get_bin(tab->bins, size_ind, ind);
2397-
if (DELETED_ENTRY_P(&tab->entries[bin])) {
2397+
if (EMPTY_OR_DELETED_BIN_P(bin)) {
2398+
continue;
2399+
}
2400+
st_table_entry *entry = &tab->entries[bin - ENTRY_BASE];
2401+
if (DELETED_ENTRY_P(entry)) {
23982402
MARK_BIN_DELETED(tab, ind);
23992403
}
24002404
}

0 commit comments

Comments
 (0)