Hi,

> Since I don't have cvs write access yet, I'm attaching two patches.
> 
> Patch #1 adds dmalloc support to the automake scripts, and includes a
> #ifdef in a key header file (resource.h) that I believe gets passed to
> everything else.

Not quite everything else; parts of the graphics subsystem are independant
and need to be provided with this in gfx_system.h; I'll take care of that.

>  And also includes a minor fix to resource.c to fix a
> potentially invalid free().

Looks like every time we finished loading resources, one free(NULL) was
invoked... this bug is probably older than the first public release!

> But then several files break compilation:
> 
> engine/game.c kgraphics.c kmenu.c
> 
> basically, there are several places there where we're calling
> port->free(GFXW(port));  (or something like that)..
> 
> and dmalloc is shitting bricks over this, as it basically redefines what
> free() is.  

That'd be hard to fix on the dmalloc end with the limited possibilities
provided by cpp, so we probably should work around this on our end indeed.

> So, I've renamed the gfx_widgets's free call to widfree.  Patch #2 is
> attached for that and everything it affects.  :)

Looks good! :-)
I've applied both patches and will commit them to CVS with the next
update.

Thanks!

llap,
 Christoph


Reply via email to