freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] problem with ft_mem_debug_realloc


From: David Turner
Subject: Re: [Devel] problem with ft_mem_debug_realloc
Date: Sun, 09 May 2004 11:43:11 +0200
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

Hello Werner,

Werner LEMBERG wrote:

David,


in ft_mem_debug_realloc there is the following test:

  if ( block == NULL || cur_size == 0 )
    ft_mem_debug_panic( "trying to reallocate NULL in (%s:%ld)",
                        file_name, line_no );

Why?  According to the realloc() man page, this case is equivalent to
malloc(), thus valid.  There is code (Update_Max in TT_Load_Context)
which needs this functionality.

I've commented this out.  Please check.

This function is never called directly, and cannot receive block == NULL
in normal cases. The check was just there to debug the memory debugger
itself :-)

Though you could still keep it, just in case some really bad things
in cases of wild memory overwrites, or something else...

Best Regards,

- David Turner
- The FreeType Project  (www.freetype.org)



    Werner

_______________________________________________
Devel mailing list
address@hidden
http://www.freetype.org/mailman/listinfo/devel







reply via email to

[Prev in Thread] Current Thread [Next in Thread]