Ouch... I got it, it indeed was a beginner mistake. Looking through
GCC to see how it used these hash tables, I noticed the problem. Sorry
for the noise!

PS: for posterity, the error was:

>   /* Register this allocation.  */
>   a = (allocation_t *) htab_find_slot (tab, p, INSERT);
>   a->p = p;
>   a->file = file;

This should have been:
  allocation_t **a;

  /* Register this allocation.  */
  a = (allocation_t **) htab_find_slot (tab, p, INSERT);
  *a = malloc (sizeof (allocation_t));
  (*a)->p = p;
  (*a)->file = file;

and later accordingly.

-- 
FX Coudert
http://www.homepages.ucl.ac.uk/~uccafco/

Reply via email to