[#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: Nobuyoshi Nakada <nobu@...>
Date: 2007-05-18 03:12:37 UTC
List: ruby-core #11202
Hi,

At Fri, 18 May 2007 05:05:24 +0900,
Paul Brannan wrote in [ruby-core:11199]:
> Now 'a' shows up twice in the local table:
> 
> == disasm: <ISeq:<main>@<compiled>>=====================================
> == catch table
> | catch type: retry  st: 0002 ed: 0010 sp: 0000 cont: 0002
> |------------------------------------------------------------------------
> local table (size: 3, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] c)
> [ 3] ?          [ 2] a          [ 1] a          
> 0000 trace            1
> 0002 newarray         0
> 0004 send             :each, 0, block in <main>, 0, <ic>
> 0010 leave            

It differs from what I got.

$ ./miniruby -e 'i = VM::InstructionSequence.new("for a in []; end"); puts i.disasm'
== disasm: <ISeq:<main>@<compiled>>=====================================
== catch table
| catch type: retry  st: 0002 ed: 0010 sp: 0000 cont: 0002
|------------------------------------------------------------------------
local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] c)
[ 2] a          [ 1] ?
0000 trace            1                                               (   1)
0002 newarray         0
0004 send             :each, 0, block in <main>, 0, <ic>
0010 leave
== disasm: <ISeq:block in <main>@<compiled>>============================
== catch table
| catch type: redo   st: 0005 ed: 0006 sp: 0000 cont: 0005
| catch type: next   st: 0005 ed: 0006 sp: 0000 cont: 0006
|------------------------------------------------------------------------
local table (size: 1, argc: 1 [opts: 0, rest: -1, post: 0, block: -1] s)
[ 1] ?<Arg>
0000 getdynamic       *, 0                                            (   1)
0003 setlocal         a
0005 putnil
0006 leave                                                            (   1)

-- 
Nobu Nakada

In This Thread