[parted-devel] [PATCH] Disable "DEBUG" in this file, thus making it so that ped_malloc
Jim Meyering
jim at meyering.net
Tue Jun 5 14:11:19 UTC 2007
Disable "DEBUG" in this file, thus making it so that ped_malloc
no longer initializes all just-allocated memory to all '1' bits.
Given the two bugs I've just fixed, this change is long overdue.
Signed-off-by: Jim Meyering <jim at meyering.net>
---
libparted/libparted.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libparted/libparted.c b/libparted/libparted.c
index b1a6201..e70f187 100644
--- a/libparted/libparted.c
+++ b/libparted/libparted.c
@@ -52,6 +52,10 @@ typedef struct
size_t size;
} pointer_size_type;
+/* IMHO, none of the DEBUG-related code below is useful, and the
+ ped_malloc memset code is actually quite harmful: it masked at
+ least two nasty bugs that were fixed in June of 2007. */
+#undef DEBUG
#ifdef DEBUG
static pointer_size_type dodgy_malloc_list[] = {
{0, 0},
@@ -340,4 +344,3 @@ ped_free (void* ptr)
free (ptr);
}
-
More information about the parted-devel
mailing list