From: "phasis68 (Heesob Park)" Date: 2013-01-22T10:51:06+09:00 Subject: [ruby-core:51558] [ruby-trunk - Bug #7721] test_too_long_path2(TestProcess) fails on mingw32 Issue #7721 has been updated by phasis68 (Heesob Park). After some inspections, I found this failure occurs not on a very long path but on a sufficiently long path with many preloaded test sets. On such a condition, acp_to_wstr or mbstr_to_wstr function returns NULL with the failure of malloc. Here is a workaround patch: diff --git a/win32.c b/win32.c.new index 3b82766..4822f63 100644 --- a/win32.c +++ b/win32.c.new @@ -1126,7 +1126,7 @@ CreateChild(const WCHAR *cmd, const WCHAR *prog, SECURITY_ATTRIBUTES *psa, dwCreationFlags |= NORMAL_PRIORITY_CLASS; - if (lstrlenW(cmd) > 32767) { + if (cmd==NULL || lstrlenW(cmd) > 32767) { child->pid = 0; /* release the slot */ errno = E2BIG; return NULL; ---------------------------------------- Bug #7721: test_too_long_path2(TestProcess) fails on mingw32 https://bugs.ruby-lang.org/issues/7721#change-35521 Author: phasis68 (Heesob Park) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 2.0.0dev (2013-01-21 trunk 38892) [i386-mingw32] [ 6319/11317] TestProcess#test_too_long_path2Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\work\snapshot-mg32>exit = 8.03 s 33) Failure: test_too_long_path2(TestProcess) [C:/work/snapshot-mg32/test/ruby/test_process.rb:1393]: [ruby-core:34833]. [Errno::ENOENT, Errno::E2BIG] expected but nothing was raised. This failure is also mentioned at https://bugs.ruby-lang.org/issues/7710#note-3 -- http://bugs.ruby-lang.org/