[parted-devel] [PATCH] Disable "DEBUG" in this file, thus making it so that ped_malloc

David Cantrell dcantrell at redhat.com
Tue Jun 5 14:45:37 UTC 2007


On Tue, 2007-06-05 at 16:11 +0200, Jim Meyering wrote:
> 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);
>  }
> -
> 

ACK

-- 
David Cantrell <dcantrell at redhat.com>
Red Hat / Westford, MA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20070605/10fd1daf/attachment.pgp 


More information about the parted-devel mailing list