diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-18 14:53:55 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-18 14:53:55 +0000 |
| commit | 1ae88a271608cec765bc12a5c14048c35dadd3bc (patch) | |
| tree | a457af4b5a906ede396c381d360a4ffdbdef07e9 | |
| parent | 8e5e7345fd287d1b4865524986abc087c532f4b2 (diff) | |
| download | ruby-1ae88a271608cec765bc12a5c14048c35dadd3bc.tar.gz ruby-1ae88a271608cec765bc12a5c14048c35dadd3bc.tar.xz ruby-1ae88a271608cec765bc12a5c14048c35dadd3bc.zip | |
* compile.c (iseq_compile_each): fix for segfault. [ruby-dev:31372]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | bootstraptest/test_eval.rb | 5 | ||||
| -rw-r--r-- | bootstraptest/test_knownbug.rb | 4 | ||||
| -rw-r--r-- | compile.c | 2 |
4 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,7 @@ +Tue Dec 18 23:53:53 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * compile.c (iseq_compile_each): fix for segfault. [ruby-dev:31372] + Tue Dec 18 23:44:32 2007 GOTOU Yuuzou <gotoyuzo@notwork.org> * test/net/http/utils.rb: split TestNetHTTPUtils module from diff --git a/bootstraptest/test_eval.rb b/bootstraptest/test_eval.rb index ed3deba98..2f5e91207 100644 --- a/bootstraptest/test_eval.rb +++ b/bootstraptest/test_eval.rb @@ -188,3 +188,8 @@ assert_equal %q{[10, main]}, %q{ C.new(&$pr) $ans } + +assert_match /Illegal break/, %q{ + STDERR.reopen(STDOUT) + eval "0 rescue break" +}, '[ruby-dev:31372]' diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index e585ba5fe..345e5c68d 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -36,10 +36,6 @@ assert_equal 'ok', %q{ } assert_normal_exit %q{ - eval "0 rescue break" -}, '[ruby-dev:31372]' - -assert_normal_exit %q{ eval "while true; return; end rescue p $!" }, '[ruby-dev:31663]' @@ -2946,7 +2946,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) } else { rb_iseq_t *ip = iseq->parent_iseq; - while (ip) { + while (ip && ip->compile_data) { level++; if (ip->compile_data->redo_label != 0) { level = 0x8000; |
