lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,
The GC bombs when trying to check if c closures are marked:

static int hasmark (const TObject *o) {
  /* valid only for locked objects */
  switch (o->ttype) {
    case TAG_STRING: case TAG_USERDATA:
      return tsvalue(o)->marked;
    case TAG_TABLE:
      return ismarked(hvalue(o));
    case TAG_LCLOSURE:  case TAG_CCLOSURE:
//      return ismarked(clvalue(o)->mark);
      return ismarked(clvalue(o));
    default:  /* number */
      return 1;
  }
}

Note the commented out line where the bug lives.

Cheers,
Philip Yi