rallocm(ALLOCM_ZERO) only zeroes *new* memory
Summary: If you allocate N bytes and then try to grow that in place using rallocm (ALLOCM_ZERO | ALLOCM_NO_MOVE) to M > N, our code assumed that all memory from N to M would be zeroed. In fact, rallocm only zeroes *new* memory, so if jemalloc actually allocated N1 > N bytes initially, rallocm will only zero memory from N1 to M. Fixed by using calloc. Test Plan: thread_local_test, tested in production Reviewed By: delong.j@fb.com FB internal diff: D519781
Showing
Please register or sign in to comment