summaryrefslogtreecommitdiffstats
path: root/xlators/features/glupy/src
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-03-26 11:25:58 +0100
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-03-30 05:37:07 -0700
commit8a2e2b88fc21dc7879f838d18cd0413dd88023b7 (patch)
tree459703725ec6411c57f6d3483888c3503afdbf38 /xlators/features/glupy/src
parent6a3024fe5953f51b51a7b9c2867d59c9e54c6d03 (diff)
mem-pool: invalidate memory on GF_FREE to aid debugging
Debugging where memory gets free'd with help from overwriting the memory before it is free'd with some structures (repeatedly). The struct mem_invalid starts with a magic value (0xdeadc0de), followed by a pointer to the xlator, the mem-type. the size of the GF_?ALLOC() requested area and the baseaddr pointer to what GF_?ALLOC() returned. With these details, and the 'struct mem_header' that is placed when calling GF_?ALLOC(), it is possible to identify overruns and possible use-after-free. A memory dump (core) or running with a debugger is needed to read the surrounding memory of corrupt structures. This additional memory invalidation/poisoning needs to be enabled by passing --enable-debug to ./configure. Change-Id: I9f5f37dc4b5b59142adefc90897d32e89be67b82 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/10019 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'xlators/features/glupy/src')
0 files changed, 0 insertions, 0 deletions