On 19/10/2010, at 1:14 PM, john skaller wrote:
> 
> Well i have just run the webserver with FLX_DEBUG on and I got a crash
> whilst garbage collecting:
> 
> ....
> Garbage 0x10010e8c0=address
> Garbage 0x10010e8d0=address
> Garbage 0x10010e900=_at19582
> Segmentation fault


Well I know where it is crashing now, roughly:


unsigned long flx_collector_t::sweep()
{
  if(debug)
    fprintf(stderr,"Collector: Sweep, garbage bit value=%d\n",(int)parity);
  unsigned long sweeped = 0;
  void *current = NULL;
  Word_t *pshape = (Word_t*)JudyLFirst(j_shape,(Word_t*)&current,&je);
  if(pshape==(Word_t*)PPJERR)judyerror("sweep");

  while(pshape!=NULL)
  {
    if((*pshape & 1) == (parity & 1UL))
    {
      if(debug)
        fprintf(stderr,"Garbage %p=%s\n",current,((gc_shape_t*)(*pshape & 
~1UL))->cname);
      ++ sweeped;
      unlink(current);
      post_delete(current);
    }
    else
      if(debug)
        fprintf(stderr,"Reachable %p=%s\n",current,((gc_shape_t*)(*pshape & 
~1UL))->cname);

    fprintf(stderr,"Calling Judy for next object\n");
    pshape = (Word_t*)JudyLNext(j_shape,(Word_t*)(void*)&current,&je);
    fprintf(stderr,"Judy got next object %p\n",pshape);
  }

  parity = !parity;
  if(debug)
    fprintf(stderr,"Sweeped %ld\n",sweeped);
  return reap();
}

As you can see the "Sweeped" message isn't printed so it has to be crashing
INSIDE the loop.. I sure hope it isn't Judy that is causing the problem,
because I cannot debug Judy and I cannot do without it either: the gc can't
be made to function efficiently with any other data structure.

BTW: Erick, the build system isn't recompiling C++ library files when I change
them in the src.. it isn't copying them either. I have to rebuild the whole 
thing
after rm -rf build which is a bit slow .. 

--
john skaller
[email protected]





------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to