develooper Front page | perl.perl5.porters | Postings from July 2001

Re: [PATCH] sub aaa { print shift}; undef %::;

Thread Previous | Thread Next
From:
Gurusamy Sarathy
Date:
July 1, 2001 17:00
Subject:
Re: [PATCH] sub aaa { print shift}; undef %::;
Message ID:
200107012359.f61NxcY04071@smtp3.ActiveState.com
On Mon, 02 Jul 2001 00:19:17 BST, Simon Cozens wrote:
>This stems a segfault coming from the above. There's a bug ID for this,
>I think, but I'm afraid I'm too zonked to find it.
>
>--- hv.c~	Mon Jul  2 00:13:03 2001
>+++ hv.c	Mon Jul  2 00:13:17 2001
>@@ -211,7 +211,7 @@
> 
>     /* entry = (HvARRAY(hv))[hash & (I32) HvMAX(hv)]; */
>     entry = ((HE**)xhv->xhv_array)[hash & (I32) xhv->xhv_max];
>-    for (; entry; entry = HeNEXT(entry)) {
>+    for (; entry && HeKEY_hek(entry); entry = HeNEXT(entry)) {
> 	if (HeHASH(entry) != hash)		/* strings can't be equal */
> 	    continue;
> 	if (HeKLEN(entry) != klen)

How came the HeKEY_hek(entry) to be null?  I suspect whatever broke that
invariant needs fixing instead.


Sarathy
gsar@ActiveState.com

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About