On Friday 03 August 2007 05:15:33 Bram Geron wrote:

> At Parrot exit, we force-destroy all PObjs. It can happen that a context
> is destroyed after its sub is destroyed. Usually that's not a problem,
> but if you run with -D80 (show when contexts are destroyed, and print
> out the name of the sub) we may segfault, because the Parrot_sub
> structure is already freed.

That's definitely a problem, but I hate to disable tracing.  This patch is 
slightly less invasive; does it solve the problem anyway?

-- c

=== src/gc/register.c
==================================================================
--- src/gc/register.c	(revision 5201)
+++ src/gc/register.c	(local)
@@ -498,7 +498,7 @@
 
             fprintf(stderr, "[free  ctx %p of sub '%s']\n",
                     (void *)ctxp,
-                    (doomed->name == (void*)0xdeadbeef
+                    (doomed && doomed->name == (void*)0xdeadbeef
                      ? "???"
                      : (char*)doomed->name->strstart));
         }

Reply via email to