guile-devel
[Top][All Lists]
Advanced

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

Re: Build Error in master


From: Noah Lavine
Subject: Re: Build Error in master
Date: Tue, 7 Feb 2012 09:46:02 -0500

Oh, and the same will happen with GC_get_suspend_signal, which we
define at scmsigs.c:155.

Other than that, though, the new gc resolves the problem I had. I am
willing to chalk this up to a GC bug and not worry about it more.

Noah

On Tue, Feb 7, 2012 at 9:07 AM, Noah Lavine <address@hidden> wrote:
> Hello,
>
> I inserted a GC_is_visible check in my code and learned that 'symbols'
> is visible, but the things it points to were getting garbage collected
> anyway. It seemed like a GC bug, so I'm trying to build Guile with the
> latest version of GC and hoping that fixes it.
>
> I just wanted to warn everyone that the GC_get_free_space_divisor
> function will break with libgc 7.2alpha6, because libgc includes the
> same function with the same name. I'm not sure what to do about that -
> probably try to automatically discover it in configure and put more
> #ifdefs around our definition (gc.c:212).
>
> Noah
>
> On Thu, Feb 2, 2012 at 9:59 PM, Noah Lavine <address@hidden> wrote:
>> Got it! And unfortunately, it's a GC error. Here's what happens:
>>
>> symbols is an SCM object defined in symbols.c. It points to an
>> scm_cell_t which has two elements: a type tag, and a pointer to an
>> scm_weak_set_t. That scm_cell_t is at 0x10101cff0.
>>
>> However, that scm_cell_t is garbage collected in the scm_cons at
>> symbols.c:250. The reason it gets filled with SCM_EOL is that the cons
>> is scm_cons (SCM_BOOL_F, SCM_EOL). So I expect that the scm_cell_t is
>> garbage collected and then immediately reclaimed to be the pair, which
>> would result in its second cell being filled with SCM_EOL, which would
>> explain why we later extract SCM_EOL from it.
>>
>> As a test, I changed the variable 'symbols' in symbols.c to be
>> non-static. That didn't fix it, but then again, I don't really know
>> how GC works yet.
>>
>> I can read the libgc documentation and try to figure this out, but can
>> anyone point me to what I should be looking for?
>>
>> Thanks,
>> Noah
>>
>> On Wed, Feb 1, 2012 at 4:01 AM, Andy Wingo <address@hidden> wrote:
>>> On Wed 01 Feb 2012 03:12, Noah Lavine <address@hidden> writes:
>>>
>>>> In the failing call,
>>>>   the SCM 'symbols' is 0x10101cff0, but the failing set is at 0x304,
>>>> which has not been allocated.
>>>
>>> 0x304 is one of the iflags, SCM_EOL I think.
>>>
>>> So, I know it might not have anything to do with it, but can you verify
>>> that your guile includes patch 0aed71aa51e89e714de2392c2a5f44694dca77ea
>>> ?  I just committed that last night, and although it does not seem to be
>>> related, who knows.
>>>
>>> Andy
>>> --
>>> http://wingolog.org/



reply via email to

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