On Fri, May 18, 2007 at 12:12:37PM +0900, Nobuyoshi Nakada wrote:
> It differs from what I got.

I reapplied the patch and rebuilt, and now I get the same disasm output
as you.  However, I still get the warning from valgrind (invalid read of
size 4 at iseq.c:763).

Also, if you dump to array and reload:

i = VM::InstructionSequence.new('for a in []; end')
puts i.disasm
a = i.to_a
i2 = VM::InstructionSequence.load(a)
puts i2.disasm

do you see the order of the table entries change?

local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] c)
[ 2] a          [ 1] ?          

local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] c)
[ 2] ?          [ 1] a          

Paul