[Yarv-devel] "a = {}; a[0] || = 1" crashes

SASADA Koichi ko1 at atdot.net
Wed Feb 23 10:48:28 EST 2005


  Vincent Isambart <vincent.isambart at gmail.com> wrote :
    [ [Yarv-devel] "a = {}; a[0] || = 1" crashes ]
    at Wed, 23 Feb 2005 10:12:30 +0100

Hi,

> YARV crashes with the following simple Ruby script:
> a = {}; a[0] || = 1
> 
> I checked it a little and it seems the error is during the compilation
> step. I do not know YARV or the Ruby interpreter very well so I may be
> mistaken.
> The problem seems to be in compile.c, and there search for NODE_OP_ASGN1.
> The error seems to be the "ADD_SEND (ret, nd_line(node),
> ID2SYM(node->nd_mid), I2F(1));"
> For the || and && operators, node->nd_mid's value is 0 and 1, it's not an ID...
> If you try a parse and disassemble the "a = {}; a[0] || = 1" script,
> you'll see that YARV will try to invoque null...

Thank you.
I missed it! I fixed it.

Regards,
-- 
// SASADA Koichi at atdot dot net
//


More information about the Yarv-devel mailing list