Blender Git Commit Log

Git Commits -> Revision f2cab82

Revision f2cab82 by Jacques Lucke (master)
August 20, 2019, 07:45 (GMT)
Memory: Fix guarded aligned malloc with small alignment

When calling `MEM_guarded_mallocN_aligned` with an alignment of 4,
a pointer that was returned that is 4 byte but not 8 byte aligned.
When freeing this pointer, `MEM_guarded_freeN` thinks that it is an
illegal pointer, because it asserts that `((intptr_t)memh) & 0x7 == 0`.

The fix is to always use at least 8 byte alignment.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5529

Commit Details:

Full Hash: f2cab8267f22293fc28de9a87f81b535b7955020
Parent Commit: 6367845
Lines Changed: +9, -6

1 Modified Path:

/intern/guardedalloc/intern/mallocn_guarded_impl.c (+9, -6) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021