develooper Front page | perl.perl6.internals | Postings from May 2008

[perl #53890] [BUG] [PATCH] Ordered hash gc bug

Thread Next
From:
NotFound
Date:
May 8, 2008 09:33
Subject:
[perl #53890] [BUG] [PATCH] Ordered hash gc bug
# New Ticket Created by  NotFound 
# Please include the string:  [perl #53890]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53890 >


Last night in #parrot particle informed of a bug in a msvc++ build. By
his suggestion, me and others were able to reproduce it in other
platforms by using the gcdebug core:

./parrot --runcore=gcdebug t/pmc/orderedhash_9.pasm

Looks like the problem is that parrot_mark_hash in hash.c expects that
buckets always contains a valid key, but DESCRIPTION in
orderedhash.pmc says:

C<delete_keyed> never removes items; they are just nulled.

The problem can be fixed by checking in parrot_mark_hash that the key
is no null before calling pobject_lives. The attached path does it.

-- 
Salu2


Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About