| Age | Commit message (Collapse) | Author |
|
dc64448202299633a235f310b8bf2192263f274f: [Backport #20716]
Fix method caching bug when including/prepend module A that prepends module B
Fix by always adding the generated iclass to the subclasses list,
otherwise the method cache for the iclass is not cleared when
the method in the module is overwritten.
Fixes [Bug #20716]
Remove an unused variable
|
|
[Bug #20755] Frozen string should not be writable via IO::Buffer
|
|
[Bug #20752] Slice of readonly `IO::Buffer` also should be readonly
|
|
[Bug #20719] `Float` argument must be ASCII compatible
|
|
[Bug #20704] Win32: Fix chdir to non-ASCII path
On Windows, `chdir` in compilers' runtime libraries uses the active
code page, but command line arguments in ruby are always UTF-8, since
commit:33ea2646b98adb49ae2e1781753bf22d33729ac0.
|
|
|
|
Fix next inside block argument stack underflow
[Bug #20344]
Fix compile_next adding removable adjust label
|
|
...pending
If two threads are running, with one calling waitpid(-1, Process::WNOHANG),
and another calling waitpid($some_pid), and then
$some_other_pid exits, we would expect the waitpid(-1,
Process::WNOHANG) call to retrieve that exit status. However, it
cannot actually do so until $some_pid _also_ exits.
This patch fixes the issue by calling do_waitpid unconditionally in
waitpid_wait; this will ensure that a waitpid -1 actually reaps
something (after first checking that no PID-directed call wants the
process).
[Bug #20490]
|
|
#20651] [Backport #20571]
Fix wrong unreachable chunk remove when jump destination label is unremovable
|
|
[Bug #20654]
This commit fixes Integer#ceil and Float#ceil when the number is
negative and ndigits is large such that 10**ndigits is a bignum.
Previously, it would return 0 in such cases. However, this would cause
unexpected behaviour such as:
puts 1.ceil(-5) # => 100000
puts 1.ceil(-10) # => 10000000000
puts 1.ceil(-20) # => 0
This commit changes the last result so that it will return
100000000000000000000.
|
|
[Bug #20654]
This commit fixes Integer#floor and Float#floor when the number is
negative and ndigits is large such that 10**ndigits is a bignum.
Previously, it would return 0 in such cases. However, this would cause
unexpected behaviour such as:
puts -1.floor(-5) # => -100000
puts -1.floor(-10) # => -10000000000
puts -1.floor(-20) # => 0
This commit changes the last result so that it will return
-100000000000000000000.
|
|
[Bug #19619] Preserve numbered parameters context
Preserve numbered parameters context across method definitions
|
|
YJIT: Fix cfp inconsistency on tailcall (#8107)
[Bug #19781]
|
|
[Bug #20468] Fix safe navigation in `for` variable
|
|
[Bug #20030] dispatch invalid escaped character without ignoring it
|
|
to ensure the issue doesn't exit in ruby_3_2 branch.
|
|
[Bug #20342] Consider wrapped load in `main` methods
|
|
d5080f6e8b77364483ff6727b1065e45e180f05d: [Backport #20292]"
This reverts commit a54c717c7a74b91a3cdf20742c355e3ea42052d1.
|
|
f23d5028059078a346efc977287b669d494a5a3f, a0f7de814ae5c299d6ce99bed5fb308a05d50ba0: [Backport #20296]
[Bug #20296] Clear errinfo when `exception: false`
[Bug #20296] Refine the test
[Bug #20296] Fix the default assertion message
|
|
d5080f6e8b77364483ff6727b1065e45e180f05d: [Backport #20292]
[Bug #20292] Truncate embedded string to new capacity
Fix -Wsign-compare on String#initialize
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
../string.c:1886:57: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
1886 | if (STR_EMBED_P(str)) RUBY_ASSERT(osize <= str_embed_capa(str));
| ^~
|
|
[Bug #20307] Fix `Hash#update` to make frozen copy of string keys
|
|
rb_obj_setup: do not copy RUBY_FL_SEEN_OBJ_ID
[Bug #20250]
We're seting up a new instance, so it never had an associated
object_id.
|
|
Fix memory leak when duplicating too complex object
[Bug #20162]
Creating a ST table then calling st_replace leaks memory because the
st_replace overwrites the ST table without freeing any of the existing
memory. This commit changes it to use st_copy instead.
For example:
RubyVM::Shape.exhaust_shapes
o = Object.new
o.instance_variable_set(:@a, 0)
10.times do
100_000.times { o.dup }
puts `ps -o rss= -p #{$$}`
end
Before:
23264
33600
42672
52160
61600
71728
81056
90528
100560
109840
After:
14752
14816
15584
15584
15664
15664
15664
15664
15664
15664
|
|
f3af5ae7e6c1c096bbfe46d69de825a02b1696cf: [Backport #20311]
Don't pin named structs defined in Ruby
[Bug #20311]
`rb_define_class_under` assumes it's called from C and that the
reference might be held in a C global variable, so it adds the
class to the VM root.
In the case of `Struct.new('Name')` it's wasteful and make
the struct immortal.
Make Struct memory leak test faster
[Bug #20311]
It times out on some platform, so we can reduce iterations.
On my machine it completes in 250ms and RSS grows 8X.
|
|
04729fe68dceddab045be7324e26c2bb15aa62c7: [Backport #20286] [Backport #20286]
Ensure that exiting thread invokes end-of-life behaviour. (#10039)
Fix exception handling in `rb_fiber_scheduler_set`. (#10042)
|
|
Don't clear pending interrupts in the parent process. (#10365)
|
|
1ab7c412d2e3880a7ad233c32e93961888f8145c, fd549b229b0822198ddc847703194263a2186ed1: [Backport #20515]"
This reverts commit dc4ca25e0a01e072ba3cf1fc47612aff72c980af.
|
|
1ab7c412d2e3880a7ad233c32e93961888f8145c, fd549b229b0822198ddc847703194263a2186ed1: [Backport #20515]
ci: Test whether GMP is working in compilers.yml (#10875)
Avoid reoccurence of [Bug #20515]
Requires https://github.com/ruby/ruby/pull/10876 since 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b
bug: https://bugs.ruby-lang.org/issues/20515
RUBY_CHECK_HEADER didn't define HAVE_{header-file} (#10876)
--with-gmp is not working at all because HAVE_GMP_H
was missing since 18eaf0be90. [Bug #20515]
bug: https://bugs.ruby-lang.org/issues/20515
follow-up: https://bugs.ruby-lang.org/issues/20494
follow-up: 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b
follow-up: https://github.com/ruby/ruby/pull/10805
test_bignum: defined? returns String (#10880)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
didn't verify the test is working properly due to mistaken auto-merge… [Bug #20515]
bug: https://bugs.ruby-lang.org/issues/20515
follow-up: 22e4eeda6561693367fc7a00b92b90f46b09cabd
follow-up: https://github.com/ruby/ruby/pull/10875
|
|
[Bug #20180]
Backports #9624.
|
|
[Bug #20569]
`putobject RubyVM::FrozenCore`, is not serializable, we
have to use `putspecialobject VM_SPECIAL_OBJECT_VMCORE`.
|
|
* Fix `io_buffer_get_string` default length computation.
When an offset bigger than the size is given, the resulting length will be
computed incorrectly. Raise an argument error in this case.
* Validate all arguments.
|
|
- Fix IO::Buffer `read`/`write` to use a minimum length.
|
|
Merged into master in 7ba2506232d3fa6c4e82e3708c0ff746a1a8de5c
[Bug #20050]
|
|
[Bug #20327] Do not count subsecond to calculate UTC offset
Assume that there will never be any time zones with UTC offsets that
are subseconds. Historically, UTC offset has only been used down to
the second.
---
test/ruby/test_time_tz.rb | 8 ++++++++
time.c | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
|
|
ac0163949a6ee678dfccec9f6e56422b91e5f0a9,01fd262e62076277a41af72ea13f20deb1b462a2: [Backport #20245]
Compile code without Symbol GC always
---
symbol.c | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
Fix crash when checking symbol encoding
[Bug #20245]
We sometimes pass in a fake string to sym_check_asciionly. This can crash
if sym_check_asciionly raises because it creates a CFP with the fake
string as the receiver which will crash if GC tries to mark the CFP.
For example, the following script crashes:
GC.stress = true
Object.const_defined?("\xC3")
---
symbol.c | 17 ++++++++++-------
test/ruby/test_module.rb | 8 ++++++++
2 files changed, 18 insertions(+), 7 deletions(-)
|
|
Fix coderange of invalid_encoding_string.<<(ord)
Appending valid encoding character can change coderange from invalid to valid.
Example: "\x95".force_encoding('sjis')<<0x5C will be a valid string "\x{955C}"
---
string.c | 6 +++++-
test/ruby/test_string.rb | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
|
|
Memory leak with TracePoint on bmethod
[Bug #20194]
When disabling the TracePoint on bmethod, the hooks list is not freed.
For example:
obj = Object.new
obj.define_singleton_method(:foo) {}
bmethod = obj.method(:foo)
tp = TracePoint.new(:return) {}
10.times do
100_000.times do
tp.enable(target: bmethod) {}
end
puts `ps -o rss= -p #{$$}`
end
Before:
18208
22832
26528
29728
34000
37776
40864
44400
47680
51504
After:
16688
17168
17168
17248
17696
17760
17824
17824
17856
17920
---
test/ruby/test_settracefunc.rb | 13 +++++++++++++
vm_trace.c | 1 +
2 files changed, 14 insertions(+)
|
|
Fix stack trace for rescued StopIteration
---
enumerator.c | 15 +++++++++++++--
test/ruby/test_enumerator.rb | 20 ++++++++++++++++++++
2 files changed, 33 insertions(+), 2 deletions(-)
|
|
[Backport #19973]"
This reverts commit 24dd529750c08b5603fb418a4f34998b9bf6c8f9.
|
|
[Bug #19973] Warn duplicated keyword arguments after keyword splat
---
parse.y | 11 +++++++----
test/ruby/test_syntax.rb | 6 ++++++
2 files changed, 13 insertions(+), 4 deletions(-)
|
|
Fix memory leak in grapheme clusters
[Bug #20150]
String#grapheme_cluters and String#each_grapheme_cluster leaks memory
because if the string is not UTF-8, then the created regex will not
be freed.
For example:
str = "hello world".encode(Encoding::UTF_32LE)
10.times do
1_000.times do
str.grapheme_clusters
end
puts `ps -o rss= -p #{$$}`
end
Before:
26000
42256
59008
75792
92528
109232
125936
142672
159392
176160
After:
9264
9504
9808
10000
10128
10224
10352
10544
10704
10896
---
string.c | 98 +++++++++++++++++++++++++++++++-----------------
test/ruby/test_string.rb | 11 ++++++
2 files changed, 75 insertions(+), 34 deletions(-)
|
|
restore the stack pointer on finalizer
When error on finalizer, the exception will be ignored.
To restart the code, we need to restore the stack pointer.
fix [Bug #20042]
---
gc.c | 4 ++++
test/ruby/test_gc.rb | 9 +++++++++
2 files changed, 13 insertions(+)
|
|
[Bug #19969] Compact st_table after deleted if possible
---
hash.c | 19 +++++++++++++++++++
st.c | 40 +++++++++++++++++++++++++++++-----------
test/ruby/test_hash.rb | 9 +++++++++
3 files changed, 57 insertions(+), 11 deletions(-)
|
|
[Bug #19924] Source code should be unsigned char stream
Use `peekc` or `nextc` to fetch the next character, instead of reading
from `lex.pcur` directly, for compilers that plain char is signed.
---
parse.y | 10 +++++-----
test/ruby/test_parse.rb | 2 ++
2 files changed, 7 insertions(+), 5 deletions(-)
|
|
4329554f171fdb483cafa672df5f2a08741940c5,b5c74d548872388921402ff2db36be15e924a89b: [Backport #19985]
[Bug #19985] Raise LoadError with the converted feature name
`Kernel#require` converts feature name objects that have the `to_path`
method such as `Pathname`, but had used the original object on error
and had resulted in an unexpected `TypeError`.
---
load.c | 14 +++++++++++---
test/ruby/test_require.rb | 26 +++++++++++++++++++++-----
2 files changed, 32 insertions(+), 8 deletions(-)
Ease the `Encoding::CompatibilityError` test failure
At the time this test first started using `assert_raise_with_message`,
it did not touch `Encoding.default_internal`.
---
test/ruby/test_require.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
[Bug #19754] Make `IO::Buffer#get_string` check `offset` range
(#8016)
---
io_buffer.c | 3 +++
test/ruby/test_io_buffer.rb | 8 ++++++++
2 files changed, 11 insertions(+)
|
|
[Bug #19901]
fix leak in module clone
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
---
class.c | 1 +
test/ruby/test_module.rb | 12 ++++++++++++
2 files changed, 13 insertions(+)
|
|
[Bug #19896]
fix memory leak in vm_method
This introduces a unified reference_count to clarify who is referencing a method.
This also allows us to treat the refinement method as the def owner since it counts itself as a reference
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
---
gc.c | 4 +-
method.h | 6 +--
rjit_c.rb | 6 +--
test/ruby/test_module.rb | 4 +-
vm_insnhelper.c | 2 +-
vm_method.c | 105 +++++++++++++++++++----------------------------
6 files changed, 54 insertions(+), 73 deletions(-)
|
|
Fix memory leak in complemented method entries
[Bug #19894]
When a copy of a complemented method entry is created, there are two
issues:
1. IMEMO_FL_USER3 is not copied, so the complemented status is not
copied over.
2. In rb_method_entry_clone we increment both alias_count and
complemented_count. However, when we free the method entry in
rb_method_definition_release, we only decrement one of the two
counters, resulting in the rb_method_definition_t being leaked.
Co-authored-by: Adam Hess <adamhess1991@gmail.com>
---
method.h | 5 +++--
test/ruby/test_module.rb | 29 +++++++++++++++++++++++++++++
vm_method.c | 8 +++++---
3 files changed, 37 insertions(+), 5 deletions(-)
|
|
Fix regression when testing inclusion in unbounded ranges
Caused by 04a92a6764bf678919cf4b68a27496a39d6b886a. This treats
unbounded ranges of arbitrary objects the same as how unbounded
string ranges are treated:
(..x) === y # (y <=> x) <= 0
(...x) === y # (y <=> x) < 0
(x..) === y # (x <=> y) <= 0
Fixes [Bug #19864]
---
range.c | 9 +++++++++
test/ruby/test_range.rb | 23 +++++++++++++++++++++++
2 files changed, 32 insertions(+)
|