[#75225] [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7) — k@...
Issue #12324 has been reported by Kazuki Yamaguchi.
6 messages
2016/04/27
[#78693] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
k@rhe.jp wrote:
[#78701] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Kazuki Yamaguchi <k@...>
2016/12/17
On Sat, Dec 17, 2016 at 01:31:12AM +0000, Eric Wong wrote:
[#78702] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
Kazuki Yamaguchi <k@rhe.jp> wrote:
[ruby-core:75090] [Ruby trunk Bug#12237] Coverage keeps tracking counts even after Coverage.result
From:
usa@...
Date:
2016-04-22 06:09:33 UTC
List:
ruby-core #75090
Issue #12237 has been updated by Usaku NAKAMURA.
Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONE to 2.1: REQUIRED, 2.2: DONE, 2.3: DONE
ruby_2_2 r54680 merged revision(s) 54465.
----------------------------------------
Bug #12237: Coverage keeps tracking counts even after Coverage.result
https://bugs.ruby-lang.org/issues/12237#change-58214
* Author: Benoit Daloze
* Status: Closed
* Priority: Normal
* Assignee: Yusuke Endoh
* ruby -v: ruby 2.4.0dev (2016-03-31 trunk 54454) [x86_64-linux]
* Backport: 2.1: REQUIRED, 2.2: DONE, 2.3: DONE
----------------------------------------
While looking at #12220, I found a bug.
Attached is a patch that reveals it.
Running
$ make test-all TESTS="test/coverage -n /test_restarting_coverage/"
gives
[1/1] TestCoverage#test_restarting_coverage
Updating cov for /tmp/d20160331-27149-q8o6co/test.rb:1 : 1 size=3 # OK
Updating cov for /tmp/d20160331-27149-q8o6co/test.rb:2 : 1 size=0 # This did RARAAY_AREF(,2) on an array of size 0!
{"/tmp/d20160331-27149-q8o6co/test.rb"=>[]}
Updating cov for /tmp/d20160331-27149-q8o6co/test.rb:2 : 2 size=0 # This did RARAAY_AREF(,4) on an array of size 0!
Updating cov for /tmp/d20160331-27149-q8o6co/test2.rb:1 : 1 size=4 # OK
{"/tmp/d20160331-27149-q8o6co/test.rb"=>[], "/tmp/d20160331-27149-q8o6co/test2.rb"=>[1, nil, 0, nil]}
Coverage tracking of files after Coverage.result (= reset) should just disable itself.
Since the current strategy is to rb_ary_clear() these arrays referenced by the iseq, one should check for bounds instead, as in the commented code.
Ideally, it could even rewrite the trace coverage instruction to a no-op, but that's more involved and might have few real use-cases.
Note that these arrays also forever leak and it would seem rb_ary_clear() does not always free the storage but just set the size to 0.
Can I commit the fix in thread.c?
I think it should be back-ported as well as it could be accessing arrays out-of-bounds.
---Files--------------------------------
0001-Demonstrate-Coverage-bug.patch (2.42 KB)
0001-thread.c-update_coverage-Do-not-track-coverage-in-lo.patch (1.88 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>