[#42] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...>

32 messages 2002/05/25
[#43] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/26

Hi,

[#45] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/26

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#46] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/26

Hi,

[#47] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/26

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#48] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/26

>>>>> "t" == ts <decoux@moulon.inra.fr> writes:

[#49] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#50] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#51] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#52] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#53] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#54] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#55] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#56] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#57] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/28

Hi,

[#65] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/28

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#84] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/29

Hi,

[#92] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/29

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#67] The warns-a-thon continues... — Sean Chittenden <sean@...>

I'm feeling left out in this race to clobber warnings!!! Attached are

19 messages 2002/05/28

[#104] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...>

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

29 messages 2002/05/30
[#105] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/30

Hi,

[#125] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/06/04

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#126] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/06/04

Hi,

[#127] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/06/04

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#130] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/06/04

Hi,

[#132] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/06/05

Hi,

[#134] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/06/05

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

Re: possible bug: stack dump with <<-String, #{...} and large loops

From: ts <decoux@...>
Date: 2002-05-25 09:26:16 UTC
List: ruby-core #42
 [[ moved to ruby-core ]]

n> Patch.

 it will not work.

pigeon% diff -u eval.c.old eval.c
--- eval.c.old  Sat May 25 10:51:01 2002
+++ eval.c      Sat May 25 10:51:44 2002
@@ -3073,9 +3073,11 @@
                        ruby_errinfo = Qnil;
                        ruby_sourceline = nd_line(node);
                        ruby_in_eval++;
+                       rb_dvar_push(0, 0);
                        list->nd_head = compile(list->nd_head->nd_lit,
                                                ruby_sourcefile,
                                                ruby_sourceline);
+                       ruby_dyna_vars = ruby_dyna_vars->next;
                        ruby_eval_tree = 0;
                        ruby_in_eval--;
                        if (ruby_nerrs > 0) {
pigeon%
 
pigeon% cat b.rb
#!./ruby -v
def html
   "#{a = 12
     2.times do
         b = 1
     end
     p 'end'
     p a}"
end
html
pigeon% 

pigeon% b.rb
ruby 1.7.2 (2002-05-23) [i686-linux]
"end"
./b.rb:8: [BUG] Segmentation fault
ruby 1.7.2 (2002-05-23) [i686-linux]
Aborted
pigeon% 

 Something like this (I *really* don't like it), without the patch to eval.c


pigeon% diff -u node.h.old node.h
--- node.h.old  Sat May 25 11:01:51 2002
+++ node.h      Sat May 25 11:01:56 2002
@@ -267,8 +267,8 @@
 #define NEW_MASGN(l,r)   rb_node_newnode(NODE_MASGN,l,0,r)
 #define NEW_GASGN(v,val) rb_node_newnode(NODE_GASGN,v,val,rb_global_entry(v))
 #define NEW_LASGN(v,val) rb_node_newnode(NODE_LASGN,v,val,local_cnt(v))
-#define NEW_DASGN(v,val) rb_node_newnode(NODE_DASGN,v,val,0);
-#define NEW_DASGN_CURR(v,val) rb_node_newnode(NODE_DASGN_CURR,v,val,0);
+#define NEW_DASGN(v,val) rb_node_newnode(NODE_DASGN,v,val,0)
+#define NEW_DASGN_CURR(v,val) rb_node_newnode(NODE_DASGN_CURR,v,val,0)
 #define NEW_IASGN(v,val) rb_node_newnode(NODE_IASGN,v,val,0)
 #define NEW_CDECL(v,val) rb_node_newnode(NODE_CDECL,v,val,0)
 #define NEW_CVASGN(v,val) rb_node_newnode(NODE_CVASGN,v,val,0)
pigeon%
 
pigeon% diff -u parse.y.old parse.y
--- parse.y.old Sat May 25 11:03:29 2002
+++ parse.y     Sat May 25 11:03:33 2002
@@ -5101,8 +5101,15 @@
     }
     if (ruby_dyna_vars)
        lvtbl->dlev = 1;
-    else
+    else {
        lvtbl->dlev = 0;
+       if (compile_for_eval) {
+           dyna_push();
+           ruby_eval_tree = block_append(ruby_eval_tree, 
+                                         NEW_DASGN(0, NEW_LIT(0)));
+       }
+    }
+           
 }
 
 static void
pigeon% 



Guy Decoux

In This Thread

Prev Next