aboutsummaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-01-17 14:33:25 +0000
committerMatt Fleming <matt.fleming@intel.com>2013-02-21 12:55:10 +0000
commit07395d946e566263525f08f31692678422976a21 (patch)
tree56e5cf30b9cbcdf75d7e1a3b7ed62186bbbd69fb /mk
parentb208ba467f678ed8e73f8d11fc0609634120cb83 (diff)
downloadsyslinux-07395d946e566263525f08f31692678422976a21.tar.gz
syslinux-07395d946e566263525f08f31692678422976a21.tar.xz
syslinux-07395d946e566263525f08f31692678422976a21.zip
mem: Add magic field to detect memory corruption
Very little checking is performed on the validity of freelist metadata. Add a magic field to struct arena_header which can be used to detect memory corruption or whether a user tries to free something that isn't a malloc pointer. This feature can be enabled with -DDEBUG_MALLOC. Turn it on for development in mk/devel.mk. Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/devel.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/mk/devel.mk b/mk/devel.mk
index 8184c30f..d1a5fff2 100644
--- a/mk/devel.mk
+++ b/mk/devel.mk
@@ -1,3 +1,4 @@
# Useful while doing development, but not for production.
GCCWARN += -Wno-clobbered
+#GCCWARN += -DDEBUG_MALLOC
# GCCWARN += -DDEBUG_PORT=0x3f8 -DDEBUG=1