[#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: nobu.nokada@...
Date: 2002-05-28 01:33:48 UTC
List: ruby-core #57
Hi,

At Tue, 28 May 2002 00:56:00 +0900,
ts wrote:
> n> Another approach.
> 
>  Seems better,

Since it was too ugly, additional patch, and testcases.  The
latest versions of 1.6 and 1.7 succeed the tests excepting
test_bug.

--- eval.c~	Mon May 27 23:34:52 2002
+++ eval.c	Tue May 28 09:34:42 2002
@@ -3059,8 +3059,6 @@ rb_eval(self, n)
 			if (ruby_scope->local_tbl) {
 			    NODE *body = (NODE *)ruby_scope->scope_node;
-			    if (body &&
-				(!body->nd_tbl ||
-				 body->nd_tbl != ruby_scope->local_tbl &&
-				 (free(body->nd_tbl), 1))) {
+			    if (body && body->nd_tbl != ruby_scope->local_tbl) {
+				if (body->nd_tbl) free(body->nd_tbl);
 				ruby_scope->local_vars[-1] =
 				    (VALUE)(body->nd_tbl = ruby_scope->local_tbl);



-- 
Nobu Nakada

Attachments (1)

tc_evstr.rb (824 Bytes, text/x-ruby)
require 'test/unit'

class TC_Evstr < Test::Unit::TestCase
  def bug
    "#{a=1}"
  end

  def bug2
   "#{a = 12
     2.times {b = 1}
     'end'
     a}"
  end

  def test_bug
    assert_equal("1", assert_nothing_raised {bug})
    assert_equal("1", assert_nothing_raised {bug})
    assert_equal("12", assert_nothing_raised {bug2})
    assert_equal("12", assert_nothing_raised {bug2})
  end

  def test_error
    begin "#{a = b = 1:}"; rescue SyntaxError; end
    assert_raises(NameError) {eval "a"}
    assert_raises(NameError) {eval "b"}
  end

  def test_raise
    begin "#{a = 1; raise}"; rescue; end
    assert_equal("1", "#{a}")
  end

  def test_nest
    "#{"#{a=1}"}"
    assert_equal("1", "#{a}")
  end

  def test_dvar
    "#{a = 12}"
    eval "x = 12"
    assert_equal("local-variable", "#{defined? x}")
  end
end

In This Thread