Edata: zero stack edatas before initializing.

This avoids some UB. No compilers take advantage of it for now, but no sense in
tempting fate.
This commit is contained in:
David Goldblatt 2020-05-13 12:42:04 -07:00 committed by David Goldblatt
parent 5dead37a9d
commit eda9c2858f
4 changed files with 12 additions and 5 deletions

View file

@ -198,7 +198,7 @@ extent_alloc_dss(tsdn_t *tsdn, arena_t *arena, void *new_addr, size_t size,
*commit = pages_decommit(ret, size);
}
if (*zero && *commit) {
edata_t edata;
edata_t edata = {0};
ehooks_t *ehooks = arena_get_ehooks(
arena);