Skip to contentSkip to conversation

master - libdm: Use wrappers for all malloc functions.

PATCH Alasdair Kergon 1 participant 1 message Jul 22, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1612c570b6412b68349b055ba3a6dab1796b8f35
Commit:        1612c570b6412b68349b055ba3a6dab1796b8f35
Parent:        b92e5026957c5ca72e6e88304feaf7527ca80af1
Author:        Alasdair G Kergon <[email protected]>
AuthorDate:    Wed Jul 22 23:03:32 2015 +0100
Committer:     Alasdair G Kergon <[email protected]>
CommitterDate: Wed Jul 22 23:11:48 2015 +0100

libdm: Use wrappers for all malloc functions.

Move the DEBUG_MEM decision inside libdevmapper.so instead of exposing it in libdevmapper.h which causes failures if the binary and library were compiled with opposite debugging settings.

---
 WHATS_NEW_DM                        |    1 +
 libdm/.exported_symbols             |    9 +++
 libdm/.exported_symbols.DM_1_02_103 |    7 +++
 libdm/libdevmapper.h                |   52 +++++++------------
 libdm/mm/dbg_malloc.c               |   95 +++++++++++++++++++++++++++++++++++
 5 files changed, 130 insertions(+), 34 deletions(-)
WHATS_NEW_DM +1 -0
index 57edd8d..3dba5b8 100644
@@ -1,5 +1,6 @@
 Version 1.02.103 -
 ================================
+  Introduce libdevmapper wrappers for all malloc-related functions.
 
 Version 1.02.102 - 7th July 2015
 ================================
libdm/.exported_symbols +9 -0
index 2b85343..6000686 100644
@@ -1,3 +1,12 @@
+dm_bounds_check_debug
+dm_dump_memory_debug
+dm_free_aux
 dm_log
 dm_log_with_errno
+dm_malloc_aux
+dm_malloc_aux_debug
+dm_realloc_aux
+dm_strdup_aux
 dm_task_get_info_with_deferred_remove
+dm_zalloc_aux
+dm_zalloc_aux_debug
libdm/.exported_symbols.DM_1_02_103 new file +7 -0
new file mode 100644
index 0000000..5dea5ea
@@ -0,0 +1,7 @@
+dm_bounds_check_wrapper
+dm_dump_memory_wrapper
+dm_free_wrapper
+dm_malloc_wrapper
+dm_realloc_wrapper
+dm_strdup_wrapper
+dm_zalloc_wrapper
libdm/libdevmapper.h +18 -34

62 lines not on this page · raw message

libdm/mm/dbg_malloc.c +95 -0

104 lines not on this page · raw message