summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-03 04:36:58 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-03 04:36:58 +0000
commit750e2a7db7bf61b6e28c1472b106112f07048df4 (patch)
treee9393c99a68c6b9240f0726e93126ae44078f66b /test
parent60fb08739642c2eee7ea4aacd946cee9393ca454 (diff)
merge revision(s) 44712,44715,44716,44722,44725,44726,44753: [Backport #9454] [Backport #9945]
* thread_pthread.c: get current main thread stack size, which may be expanded than allocated size at initialization, by rlimit(). [ruby-core:60113] [Bug #9454] * thread_pthread.c: get current main thread stack size, which may be expanded than allocated size at initialization, by rlimit(). [ruby-core:60113] [Bug #9454] * thread_pthread.c: rlimit is only available on Linux. At least r44712 breaks FreeBSD. [ruby-core:60113] [Bug #9454] * thread_pthread.c (ruby_init_stack, ruby_stack_overflowed_p): place get_stack above others to get stack boundary information. [ruby-core:60113] [Bug #9454] * thread_pthread.c (ruby_init_stack, ruby_stack_overflowed_p): place get_stack above others to get stack boundary information. [ruby-core:60113] [Bug #9454] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@46667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_exception.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index ea733b3add..4aacc4b512 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -568,4 +568,15 @@ end.join
assert_equal("Ruby", favorite_lang)
end
+
+ def test_machine_stackoverflow_by_define_method
+ bug9454 = '[ruby-core:60113] [Bug #9454]'
+ assert_separately([], <<-SRC)
+ assert_raise(SystemStackError, #{bug9454.dump}) {
+ define_method(:foo) {self.foo}
+ self.foo
+ }
+ SRC
+ rescue SystemStackError
+ end
end