From: nagachika00@... Date: 2015-08-10T15:03:50+00:00 Subject: [ruby-core:70306] [Ruby trunk - Bug #11418] spawn segfaults Issue #11418 has been updated by Tomoyuki Chikanaga. Hi, nakada san. > Maybe unnecessary before 2.2. But Backport field was filled with REQUIRED for 2.0.0 and 2.1. Which is your intention? Anyway, I try to reproduce the issue on ruby_2_2 branch with the following patch. ~~~ Index: test/ruby/test_econv.rb =================================================================== --- test/ruby/test_econv.rb (revision 51517) +++ test/ruby/test_econv.rb (working copy) @@ -913,6 +913,7 @@ end def test_default_external + GC.stress = true Encoding.list.grep(->(enc) {/\AISO-8859-\d+\z/i =~ enc.name}) do |enc| assert_separately(%W[--disable=gems -d - #{enc.name}], <<-EOS, ignore_stderr: true) Encoding.default_external = ext = ARGV[0] @@ -922,5 +923,7 @@ end EOS end + ensure + GC.stress = false end end ~~~ But make test-all TESTS='ruby/test_econv.rb -n test_default_external' finished successfully. Is there anything I overlooked? ---------------------------------------- Bug #11418: spawn segfaults https://bugs.ruby-lang.org/issues/11418#change-53726 * Author: Nobuyoshi Nakada * Status: Closed * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED ---------------------------------------- `Process.spawn` sometimes segfaults, because buffer allocated by `ALLOCV_N` is not marked, when the size exceeds 1024 bytes. In these days, `TestEncodingConverter#test_default_external` has occasionally segfaulted by this problem. Until 2.2, this has not appeared since `Process.spawn` didn't use `ALLOCV_N`. Maybe unnecessary before 2.2. -- https://bugs.ruby-lang.org/