Age | Commit message (Collapse) | Author |
|
5c7af72304d0ad33cd3f21b24a4bc44e8acd5b2c,d650b17686d49c2ce8e6a87039861154e93d4621: [Backport #18497]
Assuming EXIT_SUCCESS equals 0 is not portable
---
test/ruby/test_fiber.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
`rb_fiber_terminate` must not return [Bug #18497]
In a forked process from a fiber, the fiber becomes the only
fiber, `fiber_switch` does nothing as there is no other fibers,
`rb_fiber_terminate` does not terminate the fiber. In that case,
reaches the end of `fiber_entry` finaly, which is declared as
"COROUTINE" and should never return.
---
cont.c | 3 ++-
eval_intern.h | 2 +-
test/fiber/test_process.rb | 15 +++++++++++++++
test/ruby/test_fiber.rb | 5 +++++
4 files changed, 23 insertions(+), 2 deletions(-)
|
|
thread.c: Convert TAG_BREAK to a normal exception at thread top-level
[Bug #18475]
---
test/ruby/test_enum.rb | 11 +++++++++++
thread.c | 3 +++
2 files changed, 14 insertions(+)
|
|
Don't segfault if Warning.warn is undefined
Check that there is a method entry for the method before passing
it to rb_method_entry_arity.
Fixes [Bug #18458]
---
error.c | 3 ++-
test/ruby/test_exception.rb | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
|
|
Empty and return the buffer if zero size is given [Bug #18421]
In `IO#readpartial` and `IO#read_nonblock`, as well as `IO#read`.
---
io.c | 8 ++++++--
test/ruby/test_io.rb | 21 +++++++++++++++++++++
2 files changed, 27 insertions(+), 2 deletions(-)
|
|
d6c5a30cfdf658280338dbb8c8b17fab3190b928,a2d4e1cda68a49980a4f9f353f400efbde7e7884: [Backport #18392]
ObjectSpace::WeakMap#inspect: check if living object [Bug #18392]
---
gc.c | 29 +++++++++++++++++++++++------
test/ruby/test_weakmap.rb | 9 +++++++++
2 files changed, 32 insertions(+), 6 deletions(-)
Fixed the check order in wmap_live_p [Bug #18392]
Check if the object is a pointer to heap before check the flag in
that object.
---
gc.c | 35 ++++++++++++++++++++++-------------
1 file changed, 22 insertions(+), 13 deletions(-)
|
|
[ruby/zlib] [Bug #18358] Fix crash in zlib when in progress
When Zlib::Inflate#inflate or Zlib::Deflate#deflate is called
recursively inside the block, a crash can occur because of an
use-after-free bug.
https://github.com/ruby/zlib/commit/50fb8a0338
---
ext/zlib/zlib.c | 117 ++++++++++++++++++++++++++++++++-----------------
test/zlib/test_zlib.rb | 10 ++++-
2 files changed, 85 insertions(+), 42 deletions(-)
|
|
[ruby/zlib] Synchronize access to zstream to prevent segfault in
multithreaded use
I'm not sure whether this handles all multithreaded use cases,
but this handles the example that crashes almost immediately
and does 10,000,000 total deflates using 100 separate threads.
To prevent the tests from taking forever, the committed test
for this uses only 10,000 deflates across 10 separate threads,
which still causes a segfault in the previous implementation
almost immediately.
Fixes [Bug #17803]
https://github.com/ruby/zlib/commit/4b1023b3f2
---
ext/zlib/zlib.c | 33 ++++++++++++++++++++++++++-
test/zlib/test_zlib.rb | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 93 insertions(+), 1 deletion(-)
|
|
cf831f49189c4a890da6845e39199a5dfaf4fb48,3260602fa3d905ba310b9afbc5365ee52cb53d62:
zlib: fix Gzip{Writer,Reader}.new fails with a O_TMPFILE file
---
ext/zlib/zlib.c | 18 ++++++++++++++----
test/zlib/test_zlib.rb | 21 +++++++++++++++++++++
2 files changed, 35 insertions(+), 4 deletions(-)
Adjusted indents [ci skip]
---
ext/zlib/zlib.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
|
|
f18a0b7654d471101b207e7fe553e12a25398e45,77e1b477297a48e285d34b21e8d30ab4b46bf90c,c483aa8394fc26e341666db66938b1d6fc2cbb8e,f2e39e5fed498b51ae914ed42ec51ae578330583,6aaa1c4d09249baae93d5bb7fba585be420c4fee,923b3652247aa17ac99dc45cb1cd0654fa08d976,950c7a12efa19d73bed10d377368a50664cae32c,69ce9e4187589335124077029496ee293d4e9189,ddb87396349fa4699153d5c4c7569c2e0186adfc,09e7a0c4a4fba18e3308e4f8cb4b8b5b52b41d20,298d65b1e4f3019af7fc9b905390b56736f5fd0e,2f3edf28f3a251bac2cf3b47b46b372faac71e8e:
[ruby/rdoc] Follow-up rubygems
Use test-unit assertions instead of minitest.
https://github.com/ruby/rdoc/commit/d6a6209d7f
---
test/rdoc/test_rdoc_rubygems_hook.rb | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
[ruby/rdoc] Add an alias for test-unit with older versions of
RubyGems
https://github.com/ruby/rdoc/commit/b8d68fdd87
---
test/rdoc/test_rdoc_rubygems_hook.rb | 3 +++
1 file changed, 3 insertions(+)
[ruby/rdoc] Rwrite test-case for rubygems_hook without Gem::TestCase
https://github.com/ruby/rdoc/commit/f8d1087ce5
---
test/rdoc/test_rdoc_rubygems_hook.rb | 38 +++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 18 deletions(-)
[ruby/rdoc] Update test/rdoc/test_rdoc_rubygems_hook.rb
https://github.com/ruby/rdoc/commit/fb264c4cc4
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
---
test/rdoc/test_rdoc_rubygems_hook.rb | 4 ++++
1 file changed, 4 insertions(+)
[ruby/rdoc] Use pend instead of skip
https://github.com/ruby/rdoc/commit/8460a36d84
---
test/rdoc/test_rdoc_rubygems_hook.rb | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Close UserInteraction for tests to fix leaked file descriptors
---
test/rdoc/test_rdoc_rubygems_hook.rb | 2 ++
1 file changed, 2 insertions(+)
Make temporary directory under the regular location
---
test/rdoc/test_rdoc_rubygems_hook.rb | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Clear default configurations
Remove environment variables which can affect the default
configurations.
---
test/rdoc/test_rdoc_rubygems_hook.rb | 13 +++++++++++++
1 file changed, 13 insertions(+)
Clear rdoc options in the global rubygems configuration
---
test/rdoc/test_rdoc_rubygems_hook.rb | 2 ++
1 file changed, 2 insertions(+)
Dispose the global rubygems configuration wholely
---
test/rdoc/test_rdoc_rubygems_hook.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Discard RDOCOPT environment variable to make tests stable
---
test/rdoc/test_rdoc_rubygems_hook.rb | 1 +
1 file changed, 1 insertion(+)
[ruby/rdoc] Prefer omit to pend
These conditions are not temporary, rather platform dependent.
https://github.com/ruby/rdoc/pull/815#discussion_r654660411
https://github.com/ruby/rdoc/commit/92545fa250
---
test/rdoc/test_rdoc_rubygems_hook.rb | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
fb4cf204a662a8cd9dafef6f31f2bd0db9129abe,fa0279d947c3962c3f8c32852278d3ebb964cb19: [Backport #17725]
use me->def instead of me for opt_table
`vm_opt_method_table` is me=>bop table to manage the optimized
methods (by specialized instruction). However, `me` can be invalidated
to invalidate the method cache entry.
[Bug #17725]
To solve the issue, use `me-def` instead of `me` which simply copied
at invalidation timing.
A test by @jeremyevans https://github.com/ruby/ruby/pull/4376
---
test/ruby/test_method.rb | 15 +++++++++++++++
vm.c | 11 +++++------
2 files changed, 20 insertions(+), 6 deletions(-)
should not share same `def` for specialized method
Because the key of redefine table is `def`, `def` should be
unique for each optimized method (`alias` is not allowed).
---
array.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
test/openssl/test_cipher: skip AES-CCM tests on OpenSSL <= 1.1.1b
AES CCM mode in OpenSSL <= 1.1.1b was overly strict in the parameters
assignment order. This has been relaxed by OpenSSL 1.1.1c.
https://github.com/openssl/openssl/commit/b48e3be947ddc5da6b5a86db8341081c72b9a4ee
The test case is failing on Ubuntu 18.04 because it still uses the
initial 1.1.1 release and has the issue:
http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20210316T120003Z.fail.html.gz
---
test/openssl/test_cipher.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Make use of the check in rb_alloc_tmp_buffer2.
https://hackerone.com/reports/1328463
When parsing cookies, only decode the values
Bump version
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
|
|
|
|
|
|
f367b4ffe739453e87e55f955138b0ce662942b7,31a757a4426f1ac8c479313e01542940386fc2fe,837cbea64b74d464bfbfb10e6c81a8f92c6eee71:
assert_equal accepts an expected value as the first argument
---
test/psych/test_coder.rb | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
Make the test pass with the old libyaml
I have no idea what result is right, but it fails with libyaml 0.1.7
(bundled with Ubuntu 18.04) anyway.
---
test/psych/test_coder.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
test/psych/test_coder.rb: Suppress non-parenthesis warnings
http://rubyci.s3.amazonaws.com/debian9/ruby-master/log/20210518T093002Z.log.html.gz
```
/home/chkbuild/chkbuild/tmp/build/20210518T093002Z/ruby/test/psych/test_coder.rb:277: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
```
---
test/psych/test_coder.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
5680c38c75aeb5cbd219aafa8eb48c315f287d97,f5d20411386ff2552ff27661387ddc4bae1ebc30: [Backport #17573]
Use valid `ec` for postponed job.
Postponed job can be registered from non-Ruby thread, which means
`ec` in TLS can be NULL. In this case, use main thread's `ec` instead.
See https://github.com/ruby/ruby/pull/4108
and https://github.com/ruby/ruby/pull/4336
---
vm_trace.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
Avoid assert failure when NULL EC is expected
After 5680c38c75aeb5cbd219aafa8eb48c315f287d97, postponed job APIs now
expect to be called on native threads not managed by Ruby and handles
getting a NULL execution context. However, in debug builds the change
runs into an assertion failure with GET_EC() which asserts that EC is
non-NULL. Avoid the assertion failure by passing `false` for `expect_ec`
instead as the intention is to handle when there is no EC.
Add a test from John Crepezzi and John Hawthorn to exercise this
situation.
See GH-4108
See GH-5094
[Bug #17573]
Co-authored-by: John Hawthorn <john@hawthorn.email>
Co-authored-by: John Crepezzi <john.crepezzi@gmail.com>
---
ext/-test-/postponed_job/postponed_job.c | 31 ++++++++++++++++++++++++++
test/-ext-/postponed_job/test_postponed_job.rb | 7 ++++++
vm_trace.c | 2 +-
3 files changed, 39 insertions(+), 1 deletion(-)
|
|
Delegate keywords from Enumerable#to_a to #each
Fixes [Bug #18289]
---
enum.c | 2 +-
test/ruby/test_enum.rb | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
[Bug #18329] Fix crash when calling non-existent super method
The cme is NULL when a method does not exist, so check it before
accessing the callcache.
---
test/ruby/test_super.rb | 31 +++++++++++++++++++++++++++++++
vm_insnhelper.c | 3 ++-
2 files changed, 33 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixed FD leaks
---
test/socket/test_tcp.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
[Bug #18264] Fix memory leak in TracePoint
TracePoint leaks memory because it allocates a `rb_tp_t` struct
without ever freeing it (it is created with `RUBY_TYPED_NEVER_FREE`).
---
test/ruby/test_settracefunc.rb | 10 ++++++++++
vm_trace.c | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
|
|
|
|
Bring the local copy of ruby/openssl in sync with the upstream gem
release v2.2.1. The commits happened in the upstream repository can be
found at:
https://github.com/ruby/openssl/compare/v2.2.0...v2.2.1
Note that many of these have already been applied to ruby.git and don't
appear in the file changes of this commit.
|
|
Dump outer variables tables when dumping an iseq to binary
This commit dumps the outer variables table when dumping an iseq to
binary. This fixes a case where Ractors aren't able to tell what outer
variables belong to a lambda after the lambda is loaded via ISeq.load_from_binary
[Bug #18232] [ruby-core:105504]
---
compile.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++-
test/ruby/test_iseq.rb | 10 +++++++++
2 files changed, 64 insertions(+), 1 deletion(-)
|
|
Avoid race condition in Regexp#match
In certain conditions, Regexp#match could return a MatchData with
missing captures. This seems to require at the least, multiple
threads calling a method that calls the same block/proc/lambda
which calls Regexp#match.
The race condition happens because the MatchData is passed from
indirectly via the backref, and other threads can modify the
backref.
Fix the issue by:
1. Not reusing the existing MatchData from the backref, and always
allocating a new MatchData.
2. Passing the MatchData directly to the caller using a VALUE*,
instead of indirectly through the backref.
It's likely that variants of this issue exist for other Regexp
methods. Anywhere that MatchData is passed implicitly through
the backref is probably vulnerable to this issue.
Fixes [Bug #17507]
---
re.c | 46 +++++++++++++++++++---------------------------
test/ruby/test_regexp.rb | 21 +++++++++++++++++++++
2 files changed, 40 insertions(+), 27 deletions(-)
|
|
60d0421ca861944459f52292d65dbf0ece26e38a,b6534691a16d751d59fc572d5dddebcaeb21f007,409dbc951b9875d27bd73748c88e15386473cffb,842b0008c132dd587f09766a228041afb7fed24f: [Backport #18191]
Fix the encoding of loaded feature names [Bug #18191]
The feature names loaded from the default load paths should also
be in the file system encoding.
---
ruby.c | 12 +++++++++++-
test/ruby/test_require.rb | 22 ++++++++++++++++++++++
2 files changed, 33 insertions(+), 1 deletion(-)
Copy path strings as interned strings
---
ruby.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Replace expanded load path only when modified
---
ruby.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Skip broken strings as the locale encoding
---
internal/string.h | 1 +
ruby.c | 11 +++++++----
string.c | 6 ++++++
3 files changed, 14 insertions(+), 4 deletions(-)
|
|
89242279e61b023a81c58065c62a82de8829d0b3,529fc204af84f825f98f83c34b004acbaa802615: [Backport #18141]
Marshal.load: do not call the proc until strings have their encoding
Ref: https://bugs.ruby-lang.org/issues/18141
---
marshal.c | 7 +++-
spec/ruby/core/marshal/shared/load.rb | 62 +++++++++++++++++++++++------------
test/ruby/test_marshal.rb | 17 ++++++++++
3 files changed, 64 insertions(+), 22 deletions(-)
marshal.c: don't call the proc with partially initialized objects.
(#4866)
For cyclic objects, it requires to keep a st_table of the partially
initialized objects.
---
marshal.c | 75 ++++++++++++++++++++---------------
spec/ruby/core/marshal/shared/load.rb | 75 ++++++++++++++++++++---------------
test/ruby/test_marshal.rb | 12 ++++++
3 files changed, 97 insertions(+), 65 deletions(-)
|
|
7c0230b05d0978958f89434c84ddd9c82419c1a5,552728a23aeab0df598b356b19a573259e297d14,49af9012a20a824542cf588e55e5488895553e09: [Backport #18184]
Check the entire name as `ruby2_keywords_flag` [Bug #18184]
---
marshal.c | 2 +-
test/ruby/test_marshal.rb | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
Check the encoding of `ruby2_keywords_flag` [Bug #18184]
---
marshal.c | 1 +
test/ruby/test_marshal.rb | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
Prohibit invalid encoding symbols [Bug #18184]
---
marshal.c | 8 +++++++-
test/ruby/test_marshal.rb | 10 +++++++---
2 files changed, 14 insertions(+), 4 deletions(-)
|
|
[Bug #18173] Update loaded_features_index
If $LOADED_FEATURES is changed in the just required file, also the
index table needs to be updated before loaded_features_snapshot is
reset. If the snapshot is reset without updating the table, the
name of the added feature will not be found.
---
load.c | 1 +
test/ruby/test_require.rb | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
|
|
If the thread termination invokes user code after `th->status` becomes
`THREAD_KILLED`, and the user unblock function causes that `th->status` to
become something else (e.g. `THREAD_RUNNING`), threads waiting in
`thread_join_sleep` will hang forever. We move the unblock function call
to before the thread status is updated, and allow threads to join as soon
as `th->value` becomes defined.
This reverts commit 6505c77501f1924571b2fe620c5c7b31ede0cd22.
|
|
|
|
|
|
* Wake up join list within thread EC context.
* Consume items from join list so that they are not re-executed.
If `rb_fiber_scheduler_unblock` raises an exception, it can result in a
segfault if `rb_threadptr_join_list_wakeup` is not within a valid EC. This
change moves `rb_threadptr_join_list_wakeup` into the thread's top level EC
which initially caused an infinite loop because on exception will retry. We
explicitly remove items from the thread's join list to avoid this situation.
* Verify the required scheduler interface.
* Test several scheduler hooks methods with broken `unblock` implementation.
|
|
Preserve the encoding of the argument in IndexError [Bug #18160]
---
re.c | 20 ++++++++++----------
test/ruby/test_regexp.rb | 7 ++++++-
2 files changed, 16 insertions(+), 11 deletions(-)
|
|
[ruby/strscan] Fix segmentation fault of `StringScanner#charpos` when
`String#byteslice` returns non string value [Bug #17756] (#20)
https://github.com/ruby/strscan/commit/92961cde2b
---
ext/strscan/strscan.c | 5 +----
test/strscan/test_stringscanner.rb | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 4 deletions(-)
|
|
Check if closed after each yield [Bug #17661]
---
io.c | 4 +++-
test/ruby/test_io.rb | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 1 deletion(-)
|