[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84402] [Ruby trunk Bug#13305] Occasional segfaults after defining methods while running coverage
From:
nagachika00@...
Date:
2017-12-22 11:43:09 UTC
List:
ruby-core #84402
Issue #13305 has been updated by nagachika (Tomoyuki Chikanaga).
Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: REQUIRED to 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE
ruby_2_4 r61414 merged revision(s) 57971.
----------------------------------------
Bug #13305: Occasional segfaults after defining methods while running coverage
https://bugs.ruby-lang.org/issues/13305#change-68594
* Author: decuplet (Nikita Shilnikov)
* Status: Closed
* Priority: Normal
* Assignee: mame (Yusuke Endoh)
* Target version:
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16], ruby 2.5.0dev (2017-03-13 trunk 57944) [x86_64-darwin16]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE
----------------------------------------
The problem occurs on MRI 2.4.0 and the latest trunk only (2017-03-13 trunk 57944). After running `Coverage.start` code defines the same method few times but every time the size of the method increases. Occasionally MRI can fail on attempt to get the coverage result. The bug can be reproduced quite easily with the following two files
a.rb
```ruby
require 'coverage'
Coverage.start
require_relative './b'
add_method(Class.new)
Coverage.result
```
b.rb
```ruby
REPEATS = 400
def add_method(target)
REPEATS.times do
target.class_eval(<<~RUBY, __FILE__, __LINE__ + 1)
def foo
#{"\n" * rand(REPEATS)}
end
1
RUBY
end
end
```
Run `ruby a.rb` to reproduce the bug. Several runs may be required before MRI fails, but for me it fails on almost every run.
Note that passing filename and line number to `class_eval` is important, so as adding `1` after the method definition.
The crash report attached to the issue.
---Files--------------------------------
ruby_2017-03-12-223015_MacBook-Pro-Nikita-2.crash (12.2 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>