[Top][All Lists]

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

Re: Segmentation fault in CVS

From: Neil Jerram
Subject: Re: Segmentation fault in CVS
Date: Wed, 14 Dec 2005 23:31:39 +0000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Andy Wingo <address@hidden> writes:

> Hi,
> On Tue, 2005-12-13 at 23:58 +0000, Neil Jerram wrote:
>>   read_without_guile_data *data = (read_without_guile_data *)data;
> Didn't fix the issue for me, same symptoms. Can't run pre-inst-guile; it
> gives me:
> (pygst gst) address@hidden:~/src/guile/guile-core$ ./pre-inst-guile
> ERROR: In procedure memoization:
> ERROR: Bad binding #<freed cell 0x2aaaabc6de30; GC missed a reference>
> in expression [...]

Well this obviously looks like a GC problem, and it's always tricky to
know where to start when debugging such problems.

It might help to know what the freed cell was before the GC set its
car to scm_tc_free_cell.  Do you get the same freed cell address
repeatedly?  If so, you can add code to print out the cell just before
the places that set its car (i.e. gc-card.c lines 258 and 292),
something like:

  if (SCM_UNPACK (scmptr) == 0x2aaaabc6de30)
     scm_write (scmptr, SCM_UNDEFINED);
     scm_newline (SCM_UNDEFINED);

Otherwise, it just occurred to me to wonder more about why we need the
fix from Ludovic that I applied a few days ago.  Why is there a window
between the creation of a GC card and its being initialized by
scm_i_init_card_freelist?  Given that there is a window, can a cell be
allocated from the card before scm_i_init_card_freelist is called?  If
it can, that would explain this bug, before scm_i_init_card_freelist
unconditionally sets all cells' car to scm_tc_free_cell.

That's as far as I can get for tonight.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]