From: ts Date: 2004-08-28T22:58:39+09:00 Subject: Re: [PATCH] Subtle bug in bignum.c >>>>> "M" == Markus writes: M> I have found a rather subtle bug in the bitwise operators defined in It's really subtle :-) M> + RBIGNUM(x)->sign = RBIGNUM(x)->sign?1:0; M> + RBIGNUM(y)->sign = RBIGNUM(y)->sign?1:0; M> z = bignew(l2, RBIGNUM(x)->sign || RBIGNUM(y)->sign); M> zds = BDIGITS(z); [...] M> This fixed the problem, at least in so far as the symptoms went away. M> It may fix it correctly, if everything else only looks at the lowest bit M> of RBIGNUM()->sign, or it might be a false step if the real design M> intent is for RBIGNUM()->sign to always be either 0 or 1. it's a GC problem : your patch make the variable `x' (or `y') available for the mark phase, without this line `x' can be gc'ed. Don't ask me why ruby do this : I've not yet look at the generated assembler, and why it can't find the right `x' on the stack. Guy Decoux