Age | Commit message (Collapse) | Author |
|
[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(-)
|
|
|
|
|
|
https://github.com/ruby/drb/commit/7edf67654c
|
|
https://github.com/ruby/fcntl/commit/0bcc0c4518
|
|
|
|
|
|
|
|
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.
|
|
Fix Ractor.make_shareable changing locals for Procs
env_copy() uses rb_ary_delete_at() with a loop counting up while
iterating through the list of read only locals. rb_ary_delete_at() can
shift elements in the array to an index lesser than the loop index,
causing locals to be missed and set to Qfalse in the returned
environment.
Iterate through the locals in reverse instead, this way the shifting
never happens for locals that are yet to be visited and we process all
the locals in the array.
[Bug #18023]
---
bootstraptest/test_ractor.rb | 22 ++++++++++++++++++++++
vm.c | 2 +-
2 files changed, 23 insertions(+), 1 deletion(-)
|
|
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(+)
|
|
Use `%printer` directive for Bison 3.8
---
parse.y | 74 ++++++++++++++++++++++++++---------------------------------------
1 file changed, 29 insertions(+), 45 deletions(-)
|
|
|
|
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.
|
|
Revert "Force recycle intermediate collection in Hash#transform_keys!
[Bug #17735]"
This reverts commit 522d4cd32f7727886f4fcbc28ed29c08d361ee20.
---
hash.c | 1 -
1 file changed, 1 deletion(-)
|
|
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(-)
|