[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator

From: Paul Brannan <pbrannan@...>
Date: 2007-05-18 13:17:34 UTC
List: ruby-core #11203
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


In This Thread