This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: eval'ing a self-referential vector



> This eventually uses up all stack space.
> I'm guessing scm_copy_tree is infinitely calling itself due to the
> self-reference.

Sounds like a good guess.  Eval isn't expecting anything cyclic.

> Question: why copy vectors when eval'ing them?

No reason.  scm_copy_tree should probably detect circularities.
There's a treeish variant of the tortoise and hare algorithm we could
use.