Age | Commit message (Collapse) | Author |
|
e1b03b0c2b2449a7794f4701bab8b2382eb15116,007e439fe965871c73127928f7244ebb96a86e58:
Enable VM_ASSERT in --jit CIs (#4543)
---
.github/workflows/mjit.yml | 2 +-
ractor.c | 6 +++---
vm_core.h | 6 +++---
vm_method.c | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
Do not expect ec on rb_vm_bugreport
because a SEGV might happen on an MJIT worker. As you can clearly see
from `if (vm && ec) {`, ec is not guaranteed to exist here.
---
vm_dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
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(-)
|
|
|
|
|
|
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.
|
|
|
|
|