Branch: Tag:

2016-11-07

2016-11-07 14:03:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [resolver]: Protect id_to_program() against circularities.

2400:    * to resolv the id.    */    char *module = NULL; +  DECLARE_CYCLIC();    -  +  if (!BEGIN_CYCLIC(((ptrdiff_t)id), 0)) { +  SET_CYCLIC_RET(1); +     /* fprintf(stderr, "reserved "); */       switch(id) {
2425:    }    break;    } +  } +     if (module && get_master()) {    /* fprintf(stderr, "%s... ", module); */    push_text(module);
2438:    {    id_to_program_cache[h]=p;    /* fprintf(stderr, "found: %p\n", p); */ +  END_CYCLIC();    return p;    }    }    } -  +  END_CYCLIC();    }    /* fprintf(stderr, "not found\n"); */    return 0;