[Top][All Lists]

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

Re: guile 1.9.0 scm_read_hash_extend gc trouble

From: Neil Jerram
Subject: Re: guile 1.9.0 scm_read_hash_extend gc trouble
Date: Tue, 23 Jun 2009 00:25:48 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

"Bill Schottstaedt" <address@hidden> writes:

> I believe this is a GC problem; you're doing exactly what I'm doing,
> but in a context where the GC is not called.  If I place the
> skip comment function in its own file, and compile it
> with optimization turned off, everything is happy; if
> optimization is on (either -O or -O2), it dies.

I tried compiling my test with -O2; unfortunately it's still OK.

>  According to
> valgrind the problem is in scm_getc -- the SCM_PTAB_ENTRY
> pointer "pt" does not point to a valid structure, so the read
> and subsuequent write through pt goes off into unallocated
> memory.  I haven't tracked down the actual problem yet,
> but gc-protecting the "port" variable does no good.

Do you mean you think that pt has already been freed, or that it was
never valid?

If the former, it sounds like it would be worth trying to prove this,
by adding instrumentation to scm_gc_free that prints the pointer to
stdout whenever what is "port".

You could also instrument (or set a breakpoint on) scm_igc, to
investigate the GC factor.

I'm sorry that we've apparently broken this for you, and that I can't
help more yet...


reply via email to

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