On Fri, Jun 27, 2008 at 11:24 AM, chromatic <[EMAIL PROTECTED]> wrote: >> @@ -877,6 +951,8 @@ >> PMC_sync(p)->owner = dest_interp; >> } >> else { >> + /* XXX: This error-handling is bad, we should do >> + something more standard here instead. */ >> /* fprintf(stderr, "BAD PMC: address=%p, >> base_type=%d\n", >> p, p->vtable->base_type); */ > > I'm not sure what else to do than throw an exception. PARROT_ASSERT might be > useful.
Current behavior is to call PARROT_ASSERT(0), which will cause a failure but which won't print out any helpful message. Better alternatives might be real_exception or PANIC, to at least print out a diagnostic. This code in question occurs in src/headers.c:fix_pmc_syncs, which moves shared PMCs to a new interperter once their current interpreter is destroyed. Prior to this, the pool should be completely swept for all non-shared objects, and the only objects still alive should be the shared objects. The panic occurs when a non-shared object is found to be still alive when shared objects are moving to the interpreter. At the very least, I feel like this is ignorable. At the most, we could print out some kind of warning or even throw an exception. Either way, this is a recoverable error and we shouldn't close down the whole program here. --Andrew Whitworth