mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 22:03:07 +00:00
Fix wrong loop variable for array index in sz_boot_pind2sz_tab
The sentinel fill loop used sz_pind2sz_tab[pind] (constant) instead of sz_pind2sz_tab[i] (loop variable), writing only to the first entry repeatedly and leaving subsequent entries uninitialized.
This commit is contained in:
2
src/sz.c
2
src/sz.c
@@ -65,7 +65,7 @@ sz_boot_pind2sz_tab(const sc_data_t *sc_data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = pind; i <= (int)SC_NPSIZES; i++) {
|
for (int i = pind; i <= (int)SC_NPSIZES; i++) {
|
||||||
sz_pind2sz_tab[pind] = sc_data->large_maxclass + PAGE;
|
sz_pind2sz_tab[i] = sc_data->large_maxclass + PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user