summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-26 23:41:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-26 23:41:47 +0000
commitbeec203a1db85eab4f139a282160c7978765d3a4 (patch)
tree79cbaa24c27d9008c2aba64b1d98bfcc80e8bebb /test
parent8489ac41cadc1ef80ea57799bc833a831d1afdc6 (diff)
* process.c (proc_exec_v, rb_proc_exec_n, rb_proc_exec)
(proc_spawn_n, proc_spawn): get rid of too huge alloca(). [ruby-core:34827], [ruby-core:34833] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 55bae0650b..b25fa2c0a4 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1231,4 +1231,13 @@ class TestProcess < Test::Unit::TestCase
assert_equal("2: a b c\n", result, feature)
end
end if File.executable?("/bin/sh")
+
+ def test_too_long_path
+ bug4314 = '[ruby-core:34842]'
+ assert_raise(Errno::ENOENT, bug4314) {Process.spawn("a" * 100_000_000)}
+ if /mswin|mingw/ =~ RUBY_PLATFORM
+ bug4315 = '[ruby-core:34833]'
+ assert_raise(Errno::ENOENT, bug4315) {Process.spawn('"a"|'*100_000_000)}
+ end
+ end
end