Follow-up Comment #11, bug #15757 (project make):

I currently running in dbx with the command:

stop cond find_cycle(&global_setlist)

using

int
find_cycle(const struct variable_set_list* list)
{
  if(!list)
  {
    return 0;
  }
  const struct variable_set_list* one_step = list;
  const struct variable_set_list* two_step = list->next;

  while(
    one_step && one_step->next && 
    two_step && two_step->next && two_step->next->next)
  {
    if(one_step == two_step)
    {
      return 1;
    }
    one_step = one_step->next;
    two_step = two_step->next->next;
  }
  return 0;
}

This is obviously a bit slow but should tell me exactly where global_setlist
is becoming circular. I'll post again when I have some results.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15757>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to