At 7:11 PM -0400 7/23/03, Simon Glover wrote:
On Wed, 23 Jul 2003, Lars Balker Rasmussen wrote:
# New Ticket Created by Lars Balker Rasmussen
# Please include the string: [perl #23102]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23102 >
[i386, FreeBSD 5.0]
Putting
#include <assert.h>
#define mem_sys_free(x) do { assert(x != NULL);
mem_sys_free(x); x = NULL; } while (0)
in include/parrot/memory.h caused an abort running pmc.t's
t/pmc/pmc_73.pasm,
Assertion failed: ((pmc)->pmc_ext->data != NULL), function
Parrot_Scratchpad_destroy, file scratchpad.pmc, line 34.
While freeing a null-pointer is legal, it's probably not intentional.
This is because scratchpad's destroy method does:
mem_sys_free(PMC_data(SELF))
without checking to see if the data pointer is NULL. The patch below
should fix this.
Cool, thanks and applied.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk