Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not store any metadata where the user (was) legitimate to write
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 16 Oct 2012 16:06:31 +0000 (18:06 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 16 Oct 2012 16:18:45 +0000 (18:18 +0200)
commitea39fd08c260e7faa92334952d4acd37e3892b6c
treee09b0527dda5d91f7e7d0bfcce77a74b6ca66e87
parent47c08390d2f3cee84c293760341ac34e86c5de94
Do not store any metadata where the user (was) legitimate to write

Before, free fragments were chained within the user area, leading to
obscure breakdown when the user was mean enough to write into the
block after a free(). Now, these data are stored as swag directly into
the mdp->heapinfo that is where we store our metadata.

We have one extra complication due to the fact that heapinfo must be
reallocated when we mmap more memory. When this happens, we have to
update all swag hooks manually to apply the offset.
Yup, this went that bad :-/
src/xbt/mmalloc/mfree.c
src/xbt/mmalloc/mm_module.c
src/xbt/mmalloc/mmalloc.c
src/xbt/mmalloc/mmorecore.c
src/xbt/mmalloc/mmprivate.h
src/xbt/mmalloc/mrealloc.c