summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-07bump up RUBY_PATCHLEVELv3_0_2nagachika
2021-07-07Fix StartTLS stripping vulnerabilityShugo Maeda
This fixes CVE-2021-32066. Reported by Alexandr Savca in <https://hackerone.com/reports/1178562>.
2021-07-07bump up RUBY_PATCHLEVELnagachika
2021-07-07Ignore IP addresses in PASV responses by default, and add new option use_pasv_ipYusuke Endoh
This fixes CVE-2021-31810. Reported by Alexandr Savca. Co-authored-by: Shugo Maeda <shugo@ruby-lang.org>
2021-07-07* 2021-07-07 [ci skip]git
2021-07-07Merge RubyGems-3.2.22 and Bundler-2.2.22Hiroshi SHIBATA
2021-07-07Merge RubyGems-3.2.21 and Bundler-2.2.21Hiroshi SHIBATA
2021-07-07Also merge tool/bundler/*.rb for testing of BundlerHiroshi SHIBATA
2021-07-07Use assert_raise instead of assert_raisesHiroshi SHIBATA
2021-07-07Workaround for make test-toolHiroshi SHIBATA
2021-07-07Fix a typo of c6a11b865e1f9085c88fe169a1f47680383580c2Yusuke Endoh
It failed to define `refute_path_not_exist`
2021-07-07Alias assert/refute_path_exists for test-unit gem.Hiroshi SHIBATA
It's required at https://github.com/rubygems/rubygems/pull/3141
2021-07-07Use the latest version of Bundler's gemspecHiroshi SHIBATA
2021-07-07Merge RubyGems-3.2.20 and Bundler-2.2.20Hiroshi SHIBATA
2021-07-07Merge RubyGems-3.2.19 and Bundler-2.2.19Hiroshi SHIBATA
2021-07-07Merge RubyGems-3.2.18 and Bundler-2.2.18Hiroshi SHIBATA
2021-07-07Merge RubyGems-3.2.17 and Bundler-2.2.17Hiroshi SHIBATA
2021-07-07Merge RubyGems-3.2.16 and Bundler-2.2.16Hiroshi SHIBATA
2021-07-03Revert "merge revision(s) ↵nagachika
e86c1f6fc53433ef5c82ed2b7a4cc9a12c153e4c,f6539202c52a051a4e6946a318a1d9cd29002990: [Backport #1205]" This reverts commit e62cccaeb0986d43480bccbd365cb20056bda4d7.
2021-07-03merge revision(s) ↵nagachika
e86c1f6fc53433ef5c82ed2b7a4cc9a12c153e4c,f6539202c52a051a4e6946a318a1d9cd29002990: [Backport #1205] Work around issue transcoding issue with non-ASCII compatible encodings and xml escaping When using a non-ASCII compatible source and destination encoding and xml escaping (the :xml option to String#encode), the resulting string was broken, as it used the correct non-ASCII compatible encoding, but contained data that was ASCII-compatible instead of compatible with the string's encoding. Work around this issue by detecting the case where both the source and destination encoding are non-ASCII compatible, and transcoding the source string from the non-ASCII compatible encoding to UTF-8. The xml escaping code will correctly handle the UTF-8 source string and the return the correctly encoded and escaped value. Fixes [Bug #12052] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> --- test/ruby/test_transcode.rb | 19 +++++++++++++++++++ transcode.c | 6 ++++++ 2 files changed, 25 insertions(+) =?UTF-8?q?-=20add=20regression=20tests=20for=20U+6E7F=20(?= =?UTF-8?q?=E6=B9=BF)=20in=20ISO-2022-JP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In ISO-2022-JP, the bytes use to code are the same as those for "<>". This adds regression tests to make sure that these bytes, when representing 湿, are NOT escaped with encode("ISO-2022-JP, xml: :text) or similar. These are additional regression tests for #12052. --- test/ruby/test_transcode.rb | 3 +++ 1 file changed, 3 insertions(+)
2021-07-03merge revision(s) ↵nagachika
0846c2da457e7523819236ac7da492029b3ef73d,6c7cb00c094332a208cf36e5cd723a9ba60c41b8: [Backport #16376] Check backref number buffer overrun [Bug #16376] --- regcomp.c | 21 ++++++++++++--------- test/ruby/test_regexp.rb | 6 ++++++ 2 files changed, 18 insertions(+), 9 deletions(-) test/ruby/test_regexp.rb: Avoid "ambiguity between regexp and two divisions" --- test/ruby/test_regexp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2021-07-03merge revision(s) 5d710d7e41ef3a9877426c87de121be3bf770e34: [Backport #17476]nagachika
Fix the wrong file detection for net-*.gemspec [Bug #17476][ruby-core:101724] --- tool/rbinstall.rb | 5 +++++ 1 file changed, 5 insertions(+)
2021-06-13merge revision(s) d74e5d5b4fba41a9120b3ed2762cf765478605ad: [Backport #17948]nagachika
Crash more nicely when the VM isn't fully set up If we crash but the VM isn't fully alive, we can get an infinite loop. --- vm_dump.c | 62 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 30 deletions(-)
2021-06-10merge revision(s) 773c690f2553db31a9cc83a037f5449e0c1ea456:nagachika
[ruby/net-ftp] Bump version to 0.1.2 https://github.com/ruby/net-ftp/commit/895ba44b3c --- lib/net/ftp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2021-06-10merge revision(s) 370949aad60e992c26037241c07489c056554ea3:nagachika
test/net/ftp/test_ftp.rb - fix intermittent MinGW failure Fixes intermittent error as below: [242/838] 5316=test_ftp #<Thread:0x0000020aa8733f20 D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:2532 run> terminated with exception (report_on_exception is true): D:/a/ruby/ruby/src/tool/lib/minitest/unit.rb:199:in `assert': Expected #<Errno::ECONNRESET: An existing connection was forcibly closed by the remote host.> to be nil. (MiniTest::Assertion) from D:/a/ruby/ruby/src/tool/lib/test/unit/core_assertions.rb:504:in `assert' from D:/a/ruby/ruby/src/tool/lib/minitest/unit.rb:299:in `assert_nil' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:430:in `ensure in block in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:431:in `block in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:2539:in `block in create_ftp_server' D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:426:in `write': An existing connection was forcibly closed by the remote host. (Errno::ECONNRESET) from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:426:in `print' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:426:in `block (2 levels) in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:420:in `each' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:420:in `each_with_index' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:420:in `block in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:2539:in `block in create_ftp_server' --- test/net/ftp/test_ftp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2021-06-10merge revision(s) fe11031b677f301fa011202f3d27e8eb73064264:nagachika
test/net/ftp/test_ftp.rb: remove unused variable --- test/net/ftp/test_ftp.rb | 1 - 1 file changed, 1 deletion(-)
2021-06-10merge revision(s) 1b2abb6590a653cb7b31d73c42edbaf2d0617b27:nagachika
[ruby/net-ftp] Replace "iff" with "if and only if" iff means if and only if, but readers without that knowledge might assume this to be a spelling mistake. To me, this seems like exclusionary language that is unnecessary. Simply using "if and only if" instead should suffice. https://github.com/ruby/net-ftp/commit/e920473618 --- lib/net/ftp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2021-06-10merge revision(s) 990baec41174a0b4cf7e285cf3185b4ab444437e:nagachika
[ruby/net-ftp] Close the passive connection data socket if there is an error setting up the transfer Previously, the connection leaked in this case. This uses begin/ensure and checking for an error in the ensure block. An alternative approach would be to not even perform the connection until after the RETR (or other) command has been sent. However, I'm not sure all FTP servers support that. The current behavior is: * Send (PASV/EPSV) * Connect to the host/port returned in 227/229 reply * Send (RETR/other command) Changing it to connect after the RETR could break things. FTP servers might expect that the client has already connected before sending the RETR. The alternative approach is more likely to introduce backwards compatibility issues, compared to the begin/ensure approach taken here. Fixes Ruby Bug 17027 https://github.com/ruby/net-ftp/commit/6e8535f076 --- lib/net/ftp.rb | 24 ++++++++++++++---------- test/net/ftp/test_ftp.rb | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 12 deletions(-)
2021-06-10merge revision(s) a86c6cb34df0c44973efe6578ba1cd9150af22cf:nagachika
[ruby/net-ftp] Replace Timeout.timeout with socket timeout Timeout.timeout is inefficient since it spins up a new thread for each invocation, use Socket.tcp's connect_timeout option instead when we aren't using SOCKS (we can't replace Timeout.timeout for SOCKS yet since SOCKSSocket doesn't have a connect_timeout option). https://github.com/ruby/net-ftp/commit/d65910132f --- lib/net/ftp.rb | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
2021-06-10merge revision(s) 73f9831a57e133ab5645221df862a176a42f6685: [Backport #17941]nagachika
POSIX timer cannot be shared in forked process [Bug #17941] --- thread_pthread.c | 1 + 1 file changed, 1 insertion(+)
2021-06-03merge revision(s) ↵nagachika
86c262541ad07528842d76dab4b9b34bd888d5f4,7e14762159643b4415e094f9d2a90afaf7994588: [Backport #17935] Fix a race condition around mjit_recompile This fixes SEGVs like https://github.com/ruby/ruby/runs/2715166621?check_suite_focus=true. When mjit_recompile is called when mjit_compile is compiling the exact same iseq (and after it called mjit_capture_cc_entries), iseq->body->jit_unit is re-created and its cc_entries becomes NULL. Then, when it tries to lookup cc_entries through iseq->body->jit_unit, it fails. --- mjit.c | 21 +++++++++++++-------- mjit_worker.c | 4 ++++ 2 files changed, 17 insertions(+), 8 deletions(-) Do not doubly hold an MJIT lock This is a follow-up of 86c262541ad07528842d76dab4b9b34bd888d5f4. CRITICAL_SECTION_START/FINISH are not needed when it's called from an MJIT worker. Also, ZALLOC needs to be calloc because ZALLOC may trigger GC, which an MJIT worker must not do. --- mjit.c | 23 ++++++++++++++--------- mjit_worker.c | 4 ++-- 2 files changed, 16 insertions(+), 11 deletions(-)
2021-06-03merge revision(s) 1aac0e88193a82ed36b43e852c46414181b66455: [Backport #17928]nagachika
Mark inlined ISeqs during MJIT compilation (#4539) [Bug #17584] --- common.mk | 6 ++++++ mjit.c | 18 +++++++++++----- mjit_compile.c | 24 +++++++++++++++------ mjit_worker.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 4 files changed, 99 insertions(+), 15 deletions(-)
2021-05-29merge revision(s) 636d4f7eb9f3fcb088e1a44af4181c4aa36789b4: [Backport #17822]nagachika
Avoid setting the visibility of refinement method entries Since refinement search is always performed, these entries should always be public. The method entry that the refinement search returns decides the visibility. Fixes [Bug #17822] --- test/ruby/test_refinement.rb | 22 ++++++++++++++++++++++ vm_method.c | 15 ++++++++++----- 2 files changed, 32 insertions(+), 5 deletions(-)
2021-05-29merge revision(s) 39a2ba5cc559900c30c3143da32446c2f20a7484: [Backport #17806]nagachika
Method cache: fix refinement entry handling To invalidate some callable method entries, we replace the entry in the class. Most types of method entries are on the method table of the origin class, but refinement entries without an orig_me are housed in the method table of the class itself. They are there because refinements take priority over prepended methods. By unconditionally inserting a copy of the refinement entry into the origin class, clearing the method cache created situations where there are refinement entry duplicates in the lookup chain, leading to infinite loops and other problems. Update the replacement logic to use the right class that houses the method entry. Also, be more selective about cache invalidation when moving refinement entries for prepend. This avoids calling clear_method_cache_by_id_in_class() before refinement entries are in the place it expects. [Bug #17806] --- class.c | 4 +++- test/ruby/test_refinement.rb | 49 ++++++++++++++++++++++++++++++++++++++++++++ vm_method.c | 13 ++++++++++-- 3 files changed, 63 insertions(+), 3 deletions(-)
2021-05-29merge revision(s) 4b36a597f48c857aa5eb9ed80fec0d02f6284646: [Backport #17519]nagachika
Fix setting method visibility for a refinement without an origin class If a class has been refined but does not have an origin class, there is a single method entry marked with VM_METHOD_TYPE_REFINED, but it contains the original method entry. If the original method entry is present, we shouldn't skip the method when searching even when skipping refined methods. Fixes [Bug #17519] --- test/ruby/test_module.rb | 110 ++++++++++++++++++++++++++++++++++++++++++++++- vm_method.c | 3 +- 2 files changed, 111 insertions(+), 2 deletions(-)
2021-05-29merge revision(s) fd8991f797c145615820b4c76e6b7ac5a71339ea: [Backport #17889]nagachika
Fix lazy enumerator with index size Fixes [Bug #17889] --- enumerator.c | 7 ++++++- test/ruby/test_lazy_enumerator.rb | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-)
2021-05-29merge revision(s) 5cdf99f64e344b8e4638824d55f5caf33be682ca: [Backport #17761]nagachika
mkmf: fixed install directories of header files in extension libraries [Bug #17761] When installing an extension library which provides a header, that header should be installed under site_ruby (or vendor_ruby when "--vendor" option was given to extconf.rb). However, currently this file is about to be installed in the core include directory. --- lib/mkmf.rb | 8 ++++---- test/mkmf/test_install.rb | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 test/mkmf/test_install.rb
2021-05-23merge revision(s) cfd162d535c7a4f8b1f95255cc6be696a8b75557: [Backport #17467]nagachika
Make String#{strip,lstrip}{,!} strip leading NUL bytes The documentation already specifies that they strip whitespace and defines whitespace to include null. This wraps the new behavior in the appropriate guards in the specs, but does not specify behavior for previous versions, because this is a bug that could be backported. Fixes [Bug #17467] --- spec/ruby/core/string/lstrip_spec.rb | 18 ++++++++++++------ spec/ruby/core/string/strip_spec.rb | 22 ++++++++++------------ string.c | 4 ++-- test/ruby/test_string.rb | 16 ++++++++++++++++ 4 files changed, 40 insertions(+), 20 deletions(-)
2021-05-23merge revision(s) ↵nagachika
e019dd24df4ed7063ad80d4c2e4070141793f598,7954bb056be30e86c419fe3792064d28990a4999,7d3fdfb27dac456827b004d9e66a44b15f8cd762: [Backport #17736] Ensure the receiver is modifiable before shrinking [Bug #17736] * Ensure the receiver is modifiable before shinking [Bug #17736] * Assert the receivers are not modified --- array.c | 1 + test/ruby/test_array.rb | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) Some Hash destructive methods ensure the receiver modifiable [Bug #17736] refs: * https://bugs.ruby-lang.org/issues/17736 * https://github.com/ruby/ruby/pull/4296 This commit aims to cover following methods * Hash#select! * Hash#filter! * Hash#keep_if * Hash#reject! * Hash#delete_if I think these are not all. --- * Ensure the receiver is modifiable or not * Assert the receiver is not modified --- hash.c | 2 ++ test/ruby/test_hash.rb | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) Hash#transform_values! ensures receiver modifiable in block [Bug #17736] --- hash.c | 1 + test/ruby/test_hash.rb | 9 +++++++++ 2 files changed, 10 insertions(+)
2021-05-23merge revision(s) 10e63f3f56cc0f559816d921f3e771dea02f3eb9:nagachika
[ruby/rdoc] Vertical-bar is disallowed in path names on Windows No risk of remote code execution, when the file cannot be created. https://github.com/ruby/rdoc/runs/2565343916?check_suite_focus=true#step:5:58 ``` Error: test_remove_unparseable_CVE_2021_31799(TestRDocRDoc): Errno::EINVAL: Invalid argument @ utime_failed - | touch evil.txt && echo tags D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1142:in `utime' D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1142:in `block in touch' D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1139:in `each' D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1139:in `touch' D:/a/rdoc/rdoc/test/rdoc/test_rdoc_rdoc.rb:463:in `block (2 levels) in test_remove_unparseable_CVE_2021_31799' 460: temp_dir do 461: file_list = ['| touch evil.txt && echo tags'] 462: file_list.each do |f| => 463: FileUtils.touch f 464: end 465: 466: assert_equal file_list, @rdoc.remove_unparseable(file_list) ``` https://github.com/ruby/rdoc/commit/a7df7dc8fa --- test/rdoc/test_rdoc_rdoc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2021-05-23merge revision(s) d8a13e504992a45d52063f7c925408d7aad3595a: [Backport #17780]nagachika
[Bug #17780] Fix Method#super_method for module alias Method#super_method crashes for aliased module methods because they are not defined on a class. This bug was introduced in c60aaed1856b2b6f90de0992c34771830019e021 as part of bug #17130. --- proc.c | 2 +- test/ruby/test_method.rb | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-)
2021-05-23merge revision(s) 1ad222477344597038d7ec08885a41f547c2a3b4: [Backport #17625]nagachika
[ruby/openssl] Fixed the results of OpenSSL::Timestamp::Response#failure_info Made stored values `Symbol`s instead of `ID`s. Fixes https://bugs.ruby-lang.org/issues/17625 Co-Authored-By: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com> https://github.com/ruby/openssl/commit/f2d004679a --- ext/openssl/ossl_ts.c | 22 +++++++++++----------- test/openssl/test_ts.rb | 5 +++++ 2 files changed, 16 insertions(+), 11 deletions(-)
2021-05-23merge revision(s) 3a3b19b2bba49e5d6f1cf13764eb6dd701397be9: [Backport #17827]nagachika
Fix Monitor to lock per Fiber, like Mutex [Bug #17827] --- ext/monitor/monitor.c | 10 +++++----- test/monitor/test_monitor.rb | 7 +++++++ 2 files changed, 12 insertions(+), 5 deletions(-)
2021-05-22merge revision(s) ↵nagachika
2bc293e899c9d32dcd794a73de8925c49ecf8f15,d0e6c6e682b9ba2b0309a5177933a0628e8ef316,cc0dc67bbbe1951ff90004bc987f78545625d772,e1eff837cf12a8e813de9d4ff2db50c9b68b86b5,0ab0b86c8491d639b9ff1335ddf35e341ecd867e,6911b4bc82889860ff7da4ecf975504cdc3e5314: [Backport #17854] cdhash_cmp: can take rational literals Rational literals are those integers suffixed with `r`. They tend to be a part of more complex expressions like `123/456r`, but in theory they can live alone. When such "bare" rational literals are passed to case-when branch, we have to take care of them. Fixes [Bug #17854] --- common.mk | 1 + compile.c | 7 +++++++ internal/rational.h | 1 + rational.c | 13 ++++++++++--- test/ruby/test_rational.rb | 7 +++++++ 5 files changed, 26 insertions(+), 3 deletions(-) cdhash_cmp: rational literals with fractions Nobu kindly pointed out that rational literals can have fractions. --- compile.c | 5 +++-- test/ruby/test_rational.rb | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) cdhash_cmp: can also take complex There are complex literals `123i`, which can also be a case condition. --- compile.c | 15 +++++++++++---- complex.c | 12 +++++++++--- internal/complex.h | 1 + test/ruby/test_rational.rb | 4 ++++ 4 files changed, 25 insertions(+), 7 deletions(-) cdhash_cmp: recursively apply For instance a rational's numerator can be a bignum. Comparison using C's == can be insufficient. --- compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) cdhash_cmp: should use || cf: https://github.com/ruby/ruby/pull/4469#discussion_r628386707 --- compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) test_cdhash: refactor change class It is now strange to test Complex in a class named Rational_Test. --- test/ruby/test_rational.rb | 15 --------------- test/ruby/test_syntax.rb | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-)
2021-05-22merge revision(s) 110f242ef9b495037f59e4972ee102a8b8b372d5: [Backport #17861]nagachika
Also `\U` after control/meta is invalid [Bug #17861] As well as `\u`, `\U` should be invalid there too. And highlight including `u`/`U` not only the backslash before it. --- parse.y | 12 ++++++++++-- test/ruby/test_parse.rb | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-)
2021-05-22merge revision(s) 799ea1d1540aca03542ee31647052343507a4b41: [Backport #16651]nagachika
mkmf.rb: convert also arch_hdrdir [Bug #16651] --- lib/mkmf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2021-05-22merge revision(s) 5026f9a5d5012248729a0052cd6cec811748291b: [Backport #17868]nagachika
compile.c: stop the jump-jump optimization if the second has any event Fixes [Bug #17868] --- compile.c | 3 ++- test/ruby/test_settracefunc.rb | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-)
2021-05-22merge revision(s) 9edc162583a4f685332239f6249745ad9b518cbe: [Backport #17781]nagachika
[ruby/resolv] Fix confusion of received response message This is a follow up for commit 33fb966197f1 ("Remove sender/message_id pair after response received in resolv", 2020-09-11). As the @senders instance variable is also used for tracking transaction ID allocation, simply removing an entry without releasing the ID would eventually deplete the ID space and cause Resolv::DNS.allocate_request_id to hang. It seems the intention of the code was to check that the received DNS message is actually the response for the question made within the method earlier. Let's have it actually do so. [Bug #12838] https://bugs.ruby-lang.org/issues/12838 [Bug #17748] https://bugs.ruby-lang.org/issues/17748 https://github.com/ruby/resolv/commit/53ca9c9209 --- lib/resolv.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
2021-05-22merge revision(s) dfe21ef7a15a30fc33f3a5cc089e15d09e905eb4: [Backport ↵nagachika
#17874] [Backport #17876] Do not block JIT with pending_stale_p Because we want to flush pending stale units before unloading units, the pending_stale_p check is implemented in this waiting loop. However, once all methods are called more than --jit-min-calls, mjit_worker_wakeup will not be signaled again. As a result, when mjit_recompile is called after that and pending_stale_p becomes true, MJIT stops processing methods in the unit queue even if the queue is very long and MJIT does nothing, waiting for the signal. There should be a better way to handle this, but as a fix to be backported to Ruby 3.0, let me make an obvious simple commit here. --- mjit_worker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2021-05-22merge revision(s) ↵nagachika
b1c73f239fe9af97de837331849f55d67c27561e,bb570ce6d80d28cfc7131dcb72885eed2f989b30,b88d1e6b44164bca0c2b85ea6639469813e1e1d8,127f735c1e5e0771076caf2a74390757a42fb177,f3f1a666c77f8c528b0adc9ccf78e4b9910bd6e0,fa048a0f8523cefde5428805dd334691486319e6,d5d1c41728d65acfb8aa2cf95f2d8ac88f271cd1,52ebaf718e6a78297ceb0dff49815eeed28eae45,7fe22152fc28084f4395fece84ff6e5eb2d6b288,19e6d271266eca5925e66fc8ec39b251a2fa6bcd,05898c5b9001c0b1e8bd7bf0d12b42a8e7c388b8,3651f678a719ae3a35825bcb4e0dabbc7c60d8df,10b082064e6ab0943cce4ef43e567d8044c7096d,de8e6218a3257fe19b46ff0aa157e66f452ac8b7,971a0cd246db6578e1ea8760a903e1a23e3681f3,61a29a41e1d0d11a9963315aa86d25ed690124c0,ff9a00887161840eb8a34d53749a7d7962181cfe,fad3412d475b57055f426cf4e86eafeab516672b,54aa11efa8b1be2c5d20402890d6d2fa90aa19a8,e84d275fe6d0c14ba58ce73b13323879c060b7ae,61e1cf23ac0d122fba3ad4cbaa402c7c94ad54d3,a6948329f8f89fb390215086fe4a888915fd589e,64b991b0cd98ee8f23266b8cbea0fa34bdaab1ec,b1c73f239fe9af97de837331849f55d67c27561e,0ee24b4fab1a1faef600a42c29863e1c3edd8c61: [Backport #17877] Synchronize rdoc with upstream version v6.3.1. [ruby/rdoc] Use File.open to fix the OS Command Injection vulnerability in CVE-2021-31799 https://github.com/ruby/rdoc/commit/a7f5d6ab88 --- lib/rdoc/rdoc.rb | 2 +- test/rdoc/test_rdoc_rdoc.rb | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) [ruby/rdoc] Support ChangeLog generated by `git log` https://github.com/ruby/rdoc/commit/5e0a123ca1 --- lib/rdoc/parser/changelog.rb | 35 +++++++++++++++++++++ test/rdoc/test_rdoc_parser_changelog.rb | 56 +++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) [ruby/rdoc] Make each commit entries h3 https://github.com/ruby/rdoc/commit/11eefb2ae9 --- lib/rdoc/parser/changelog.rb | 12 ++++++------ test/rdoc/test_rdoc_parser_changelog.rb | 12 ++++-------- 2 files changed, 10 insertions(+), 14 deletions(-) [ruby/rdoc] Tweak log entry markdown * add 3 levels to headings * prefix commit log to labels to make unique IDs https://github.com/ruby/rdoc/commit/5074c13209 --- lib/rdoc/parser/changelog.rb | 20 +++++++++++++++++- test/rdoc/test_rdoc_parser_changelog.rb | 36 ++++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) [ruby/rdoc] Shorten commit hashes https://github.com/ruby/rdoc/commit/5d3e153963 --- lib/rdoc/parser/changelog.rb | 2 +- test/rdoc/test_rdoc_parser_changelog.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) [ruby/rdoc] Add links to the commits https://github.com/ruby/rdoc/commit/1821628076 --- lib/rdoc/parser/changelog.rb | 107 +++++++++++++++++++++++++------- test/rdoc/test_rdoc_parser_changelog.rb | 36 ++++++----- 2 files changed, 107 insertions(+), 36 deletions(-) [ruby/rdoc] Sort by CommitDate if available https://github.com/ruby/rdoc/commit/455715e930 --- lib/rdoc/parser/changelog.rb | 11 ++++++--- test/rdoc/test_rdoc_parser_changelog.rb | 40 +++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) [ruby/rdoc] Skip non-date logs by git-log `RDoc::Parser::ChangeLog` mis-parses ChangeLog generated by git-log, because of too heuristic `Time.parse`. For instance, "commit 8187228de0142d3ac7950b7d977c2849e934c637" results in "8187-08-16", that is, day 228 in the year 8187. https://github.com/ruby/rdoc/commit/9711e6f6d9 --- lib/rdoc/parser/changelog.rb | 36 ++++++++++++++++++++------------- test/rdoc/test_rdoc_parser_changelog.rb | 2 ++ 2 files changed, 24 insertions(+), 14 deletions(-) [ruby/rdoc] Support other date formats in git-log https://github.com/ruby/rdoc/commit/ad8cf37d72 --- lib/rdoc/parser/changelog.rb | 6 +++--- test/rdoc/test_rdoc_parser_changelog.rb | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) [ruby/rdoc] Support iso-strict format in git-log https://github.com/ruby/rdoc/commit/2a6c22da63 --- lib/rdoc/parser/changelog.rb | 6 +++--- test/rdoc/test_rdoc_parser_changelog.rb | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) [ruby/rdoc] Update Rdoc.css sidebar panel. Updates css so the sidebar look like a panel instead of looking like chopped edges. https://github.com/ruby/rdoc/commit/b0098c6d72 --- lib/rdoc/generator/template/darkfish/css/rdoc.css | 1 + 1 file changed, 1 insertion(+) [ruby/rdoc] Support GFM table https://github.com/ruby/rdoc/commit/9dc933df16 --- lib/rdoc/markdown.rb | 349 +++++++++++++++++++++++++++++++- lib/rdoc/markup.rb | 1 + lib/rdoc/markup/table.rb | 47 +++++ lib/rdoc/markup/to_html.rb | 23 +++ lib/rdoc/markup/to_joined_paragraph.rb | 1 + lib/rdoc/markup/to_rdoc.rb | 28 +++ lib/rdoc/markup/to_table_of_contents.rb | 1 + test/rdoc/test_rdoc_markdown.rb | 23 +++ 8 files changed, 471 insertions(+), 2 deletions(-) create mode 100644 lib/rdoc/markup/table.rb [ruby/rdoc] Add table style https://github.com/ruby/rdoc/commit/2219c5ae80 --- lib/rdoc/generator/template/darkfish/css/rdoc.css | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) [ruby/rdoc] Fixed CodeFence without blank lines Currently a fenced code block needs a preceding blank line, it should not be required, as: https://github.github.com/gfm/#fenced-code-blocks > A fenced code block may interrupt a paragraph, and does not > require a blank line either before or after. Just recommended: https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks > We recommend placing a blank line before and after code blocks > to make the raw formatting easier to read. https://github.com/ruby/rdoc/commit/0e1776caf3 --- lib/rdoc/markdown.rb | 447 +++++++--------------------------------- test/rdoc/test_rdoc_markdown.rb | 36 +++- 2 files changed, 112 insertions(+), 371 deletions(-) [ruby/rdoc] Allow partial default values to be overridden with .rdoc_options https://github.com/ruby/rdoc/commit/e14800891f --- lib/rdoc/options.rb | 34 +++++++++++++++++++++++++++++++++- lib/rdoc/rdoc.rb | 7 ++++++- test/rdoc/test_rdoc_rdoc.rb | 12 ++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) [ruby/rdoc] Allow empty .rdoc_options https://github.com/ruby/rdoc/commit/0c8cb25b50 --- lib/rdoc/rdoc.rb | 2 ++ test/rdoc/test_rdoc_rdoc.rb | 11 +++++++++++ 2 files changed, 13 insertions(+) [ruby/rdoc] Suppress unused variable warning of "text" https://github.com/ruby/rdoc/commit/3a4120b155 --- lib/rdoc/markdown.rb | 345 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 343 insertions(+), 2 deletions(-) [ruby/rdoc] Get rid of a trailing space https://github.com/ruby/rdoc/commit/7b7b91768e --- lib/rdoc/markdown.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) [ruby/rdoc] Disable other notations in <code> tags https://github.com/ruby/rdoc/commit/0cd3b55210 --- lib/rdoc/markup/attr_span.rb | 10 ++- lib/rdoc/markup/attribute_manager.rb | 102 ++++++++++++++++++------ test/rdoc/test_rdoc_markup_attribute_manager.rb | 24 +++++- test/rdoc/test_rdoc_markup_to_html.rb | 6 ++ 4 files changed, 114 insertions(+), 28 deletions(-) [ruby/rdoc] Treat other tags as word boundaries https://github.com/ruby/rdoc/commit/8222f85a17 --- lib/rdoc/markup/attribute_manager.rb | 17 +++++++++++++---- test/rdoc/test_rdoc_markup_to_html.rb | 5 +++++ 2 files changed, 18 insertions(+), 4 deletions(-) [ruby/rdoc] Treat emphasis tags as excluding other notations And exclusive notations don't exclude other exclusive notations. https://github.com/ruby/rdoc/commit/b8baa9a435 --- lib/rdoc/markup/attr_span.rb | 2 +- lib/rdoc/markup/attribute_manager.rb | 10 +++++----- test/rdoc/test_rdoc_markup_attribute_manager.rb | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) [ruby/rdoc] Clarify that dots in URL are replaced The dots in all path components from the document root are replaced with underscores, not only in the basename. https://github.com/ruby/rdoc/commit/7a3417ea4c --- test/rdoc/test_rdoc_top_level.rb | 3 +++ 1 file changed, 3 insertions(+) [ruby/rdoc] Links to document texts without "rdoc-ref:" prefix While links to generated HTML from RDoc file needs to be prefixed by "rdoc-ref:" currently, in case of explicit references this seems just redundant. Also GitHub RDoc support does not work with this prefix. This patch lets links to such document texts (".rb", ".rdoc" and ".md" now) refer URLs generated by `RDoc::TopLevel#http_url` without the prefix. https://github.com/ruby/rdoc/commit/f18b27b69d --- lib/rdoc/markup/to_html.rb | 4 ++++ test/rdoc/test_rdoc_markup_to_html.rb | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) [ruby/rdoc] Use File.open to fix the OS Command Injection vulnerability in CVE-2021-31799 https://github.com/ruby/rdoc/commit/a7f5d6ab88 --- lib/rdoc/rdoc.rb | 2 +- test/rdoc/test_rdoc_rdoc.rb | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) [ruby/rdoc] Version 6.3.1 https://github.com/ruby/rdoc/commit/9307f932b7 --- lib/rdoc/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)