chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] valgrind


From: Jörg F . Wittenberger
Subject: Re: [Chicken-users] valgrind
Date: 29 Sep 2011 22:25:16 +0200

On Sep 29 2011, Alan Post wrote:

Since it seems as good a day as any for wild-ass speculation, what
about this scenario:

We allocate an object, set the tag pointer, but don't fill out all
of the memory yet.  We're yet to need it.

Oops!  The gc gets called, and that object has to move.  So we
memcpy it to it's new home and tuck it into bed.

Wouldn't valgrind complain that we just memcpy'd uninitialized
memory, even though in this case it is a completely safe operation?

Maybe.  Maybe Felix could shed some light.  I can't.

However as far as I read it, this should not happen.

The pattern is to allocate some space on the stack, fill stuff in,
eventually jump to the continuation.  GC will only happen during the
jump, not within the time between allocation and assignment of initial
values.  (Beware: It's my reading of source!)







reply via email to

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