# 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.

with the following backtrace

#0  0x2822d613 in kill () from /usr/lib/libc.so.5
#1  0x28290cac in abort () from /usr/lib/libc.so.5
#2  0x2826b0ff in __assert () from /usr/lib/libc.so.5
#3  0x081637af in Parrot_Scratchpad_destroy (interpreter=0x81ba000, 
    pmc=0x81e765c) at scratchpad.pmc:34
#4  0x0814f354 in free_unused_pobjects (interpreter=0x81ba000, pool=0x81de180)
    at dod.c:503
#5  0x0806e867 in Parrot_really_destroy (exit_code=0, vinterp=0x81ba000)
    at interpreter.c:649
#6  0x0814fd99 in Parrot_exit (status=0) at exit.c:66
#7  0x0806c824 in main (argc=1, argv=0xbfbff7e0) at main.c:474
#8  0x0805a385 in _start ()

While freeing a null-pointer is legal, it's probably not intentional.

Cheers,
-- 
Lars Balker Rasmussen                                      Consult::Perl



Reply via email to