Felix:
> another possible fix is to declare conv_res as volatile. It
> will still be gc protected if it's on the stack and not in a
> register, right?
>
> declaring it volatile forces the compiler to keep it on the
> stack, not in a register, so the value won't ever be
> eliminated by live-range analysis.
Thank you for that suggestion. I had not known about
volatile! The definitions for what it means are a little
vague to say the least. I don't know if we can rely on
all the compilers we might use to guarantee that
it is obeyed.
> rrrr. finding other occurrences of this type of problem is
> nontrivial. it can happen whenever you construct a scheme
> object as a temporary holder for non-scheme objects.
But only if you have taken a copy from the objects
internals whose recovery by the GC would cause problems.
It is hard for me to imagine cases where this might occur.
I can think of plenty of nonsensical cases, such as:
STk_makestring(CHARS(STk_makestring("one")));
which doesn't make too much sense.
Paul.
______
Paul Anderson. GrammaTech, Inc. Tel: +1 607 273-7340
mailto:paul_at_grammatech.com
http://www.grammatech.com
Received on Thu Apr 06 2000 - 21:46:44 CEST