This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: call-with-dynamic-root and fluids
Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> But note then that the entire implementation of this mechanism becomes
> restricted to creating a unique object representing the root, (this is
> currently a number), and checking that caller and callee is associated
> with the same object.
Sorry about this, I couldn't resist...
Technically, there's a hole in the current implementation; the
call-with-dynamic-root protection fails when n_dynamic_roots wraps.
If you grab a continuation in a callback, then wait for 2^32 callbacks
(less than 5 days if you call callbacks at 10kHz) and invoke the
continuation, bad things happen.
(This could be fixed by using a new cons cell for the marker, rather
than an int. But it's probably not worth fixing at all.)
Carl Witty