[#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-17 01:39:17 UTC
List: ruby-core #11189
Hi,

At Thu, 17 May 2007 07:01:19 +0900,
Paul Brannan wrote in [ruby-core:11188]:
> After a little more experiment, it does seem to fix the reported
> problem, but now valgrind is giving me this when I call disasm:

Can you tell which disasm emits this?

> == disasm: <ISeq:<main>@<compiled>>=====================================
> 0000 trace            1                                               (   1)
> 0002 putobject        1
> 0004 putobject        1
> 0006 opt_plus         
> 0007 leave            
> == disasm: <ISeq:<main>@<compiled>>=====================================
> local table (size: 1, argc: 0 [opts: 0, rest: -1, block: -1] c)
> [ 1] ?          

I'm not sure if opts is needed in TOPLEVEL and CLASS types.


Index: compile.c
===================================================================
--- compile.c	(revision 12284)
+++ compile.c	(working copy)
@@ -4771,7 +4771,5 @@ iseq_build_from_ary(rb_iseq_t *iseq, VAL
     DECL_ANCHOR(anchor);
 
-    if (iseq->type == ISEQ_TYPE_METHOD ||
-	iseq->type == ISEQ_TYPE_TOP ||
-	iseq->type == ISEQ_TYPE_CLASS) {
+    if (iseq->type == ISEQ_TYPE_METHOD) {
 	opt = 1;
     }


-- 
Nobu Nakada

In This Thread