* 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
This commit is contained in:
nobu 2011-01-26 23:41:47 +00:00
parent 8489ac41ca
commit beec203a1d
3 changed files with 58 additions and 18 deletions

View file

@ -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