| Age | Commit message (Collapse) | Author |
|
Previously, when Block::entry_exit is requested from any instruction
that is not the first one in the block, we generated the exit with an
incorrect PC. We should always be using the PC for the entry of the
block for Block::entry_exit.
It was a simple typo. The bug was [introduced][1] while we were
refactoring to use the current backend. Later, we had a chance to spot
this issue while [preparing][2] to enable unused variable warnings, but
didn't spot the issue.
Fixes [Bug #19463]
[1]: 27fcab995e6dde19deb91dc6e291bdb72100af68
[2]: 31461c7e0eab4963ccc8649ea8ebf27979132c0c
Notes:
Merged: https://github.com/ruby/ruby/pull/7374
Merged-By: XrXr
|
|
[Feature #18498]
Notes:
Merged: https://github.com/ruby/ruby/pull/5570
|
|
There is a `time` key in GC.stat that gives us the total time spent in
GC. However, we don't know what proportion of the time is spent between
marking and sweeping. This makes it difficult to tune the GC as we're
not sure where to focus our efforts on.
This PR adds keys `marking_time` and `sweeping_time` to GC.stat for the
time spent marking and sweeping, in milliseconds.
[Feature #19437]
Notes:
Merged: https://github.com/ruby/ruby/pull/7304
|
|
Follows up [Bug #19400]
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6950
|
|
Extracted arguments do not have keyword hash to splat.
Notes:
Merged: https://github.com/ruby/ruby/pull/7325
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Could return a subclass.
[Bug #19444]
Notes:
Merged: https://github.com/ruby/ruby/pull/7328
|
|
We saw SEGVs due to this when running with StackProf, which needs a
correct PC for RUBY_INTERNAL_EVENT_NEWOBJ, the same event used for
ObjectSpace allocation tracing.
[Bug #19444]
Notes:
Merged: https://github.com/ruby/ruby/pull/7328
|
|
Co-authored-by: Adam Hess <hparker@github.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/7314
|
|
|
|
This patch is follo-up of 0a82bfe.
Without this patch, if env is escaped (Proc'ed), strange svar
can be touched.
This patch tracks escaped env and use it.
Notes:
Merged: https://github.com/ruby/ruby/pull/7282
|
|
When a class with a class variable is cloned we need to also copy the
cvar cache table from the original table to the clone. I found this bug
while working on fixing [Bug #19379]. While this does not fix that bug
directly it is still a required change to fix another bug revealed by
the fix in https://github.com/ruby/ruby/pull/7265
This needs to be backported to 3.2.x and 3.1.x.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/7275
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7277
|
|
[Bug #19415]
If multiple threads attemps to load the same file concurrently
it's not a circular dependency issue.
So we check that the existing ThreadShield is owner by the current
fiber before warning about circular dependencies.
Notes:
Merged: https://github.com/ruby/ruby/pull/7257
|
|
The old RUBY_GC_HEAP_INIT_SLOTS isn't really usable anymore as
it initalize all the pools by the same factor, but it's unlikely
that pools will need similar sizes.
In production our 40B pool is 5 to 6 times bigger than our 80B pool.
Notes:
Merged: https://github.com/ruby/ruby/pull/7235
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7263
|
|
This reverts commit fa49651e05a06512e18ccb2f54a7198c9ff579de.
Notes:
Merged: https://github.com/ruby/ruby/pull/7256
|
|
[Bug #19415]
If multiple threads attemps to load the same file concurrently
it's not a circular dependency issue.
So we check that the existing ThreadShield is owner by the current
fiber before warning about circular dependencies.
Notes:
Merged: https://github.com/ruby/ruby/pull/7252
|
|
Create SHAPE_MAX_NUM_IVS (currently 50) and limit all shapes of
T_OBJECTS to that number of IVs. When a shape with a T_OBJECT has more than 50 IVs, fall back to the
obj_too_complex shape which uses hash lookup for ivs.
Note that a previous version of this commit
78fcc9847a9db6d42c8c263154ec05903a370b6b was reverted in
88f2b94065be3fcd6769a3f132cfee8ecfb663b8 because it did not account for
non-T_OBJECTS
Notes:
Merged: https://github.com/ruby/ruby/pull/7188
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
There's a memory leak in ObjectSpace::WeakMap due to not freeing
the `struct weakmap`. It can be seen in the following script:
```
100.times do
10000.times do
ObjectSpace::WeakMap.new
end
# Output the Resident Set Size (memory usage, in KB) of the current Ruby process
puts `ps -o rss= -p #{$$}`
end
```
Notes:
Merged: https://github.com/ruby/ruby/pull/7223
|
|
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
YJIT: Fix BorrowMutError
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
This was broken in ec3542229b29ec93062e9d90e877ea29d3c19472. That commit
didn't handle cases where extended mode was turned on/off inside the
regexp. There are two ways to turn extended mode on/off:
```
/(?-x:#y)#z
/x =~ '#y'
/(?-x)#y(?x)#z
/x =~ '#y'
```
These can be nested inside the same regexp:
```
/(?-x:(?x)#x
(?-x)#y)#z
/x =~ '#y'
```
As you can probably imagine, this makes handling these regexps
somewhat complex. Due to the nesting inside portions of regexps,
the unassign_nonascii function needs to be recursive. In
recursive mode, it needs to track both opening and closing
parentheses, similar to how it already tracked opening and
closing brackets for character classes.
When scanning the regexp and coming to `(?` not followed by `#`,
scan for options, and use `x` and `i` to determine whether to
turn on or off extended mode. For `:`, indicting only the
current regexp section should have the extended mode
switched, recurse with the extended mode set or unset. For `)`,
indicating the remainder of the regexp (or current regexp portion
if already recursing) should turn extended mode on or off, just
change the extended mode flag and keep scanning.
While testing this, I noticed that `a`, `d`, and `u` are accepted
as options, in addition to `i`, `m`, and `x`, but I can't see
where those options are documented. I'm not sure whether or not
handling `a`, `d`, and `u` as options is a bug.
Fixes [Bug #19379]
Notes:
Merged: https://github.com/ruby/ruby/pull/7192
|
|
[Bug #19390]
We shouldn't check the string length when skipping zeros, as the
string might only contains zero characters, resulting in an empty string.
Notes:
Merged: https://github.com/ruby/ruby/pull/7196
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7136
|
|
Fixes [Bug #19343]
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
bytesplice(index, length, str, str_index, str_length) -> string
bytesplice(range, str, str_range) -> string
In these forms, the content of +self+ is replaced by str.byteslice(str_index, str_length) or str.byteslice(str_range); however the substring of +str+ is not allocated as a new string.
Notes:
Merged: https://github.com/ruby/ruby/pull/7160
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7124
|
|
In Feature #19314, we concluded that the return value of String#bytesplice
should be changed from the source string to the receiver, because the source
string is useless and confusing when extra arguments are added.
This change should be included in Ruby 3.2.1.
|
|
than max value
Notes:
Merged: https://github.com/ruby/ruby/pull/6802
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
[Bug #19339]
Notes:
Merged: https://github.com/ruby/ruby/pull/7129
|
|
Also `Numeric#remainder` should.
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
This optimisation is no longer helpful now that we use VWA to allocate
strings in larger size pools where they can be embedded.
Notes:
Merged: https://github.com/ruby/ruby/pull/6965
|
|
|
|
On the cfunc methods, if a splat argument is given, all array elements
are expanded on the VM stack and it can cause SystemStackError.
The idea to avoid it is making a hidden array to contain all parameters
and use this array as an argv.
This patch is reviesed version of https://github.com/ruby/ruby/pull/6816
The main change is all changes are closed around calling cfunc logic.
Fixes [Bug #4040]
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
Notes:
Merged: https://github.com/ruby/ruby/pull/7109
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7079
|
|
Previously, we did not update `cfp->sp` before calling the C function of
ISEQs marked with `Primitive.attr! "inline"` (leaf builtins). This
caused the GC to miss temporary values on the stack in case the function
allocates and triggers a GC run. Right now, there is only a few leaf
builtins in numeric.rb on Integer methods such as `Integer#~`. Since
these methods only allocate when operating on big numbers, we missed
this issue.
Fix by saving PC and SP before calling the functions -- our usual
protocol for calling C functions that may allocate on the GC heap.
[Bug #19316]
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7071
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7071
|
|
The reference updating code for strings is not re-embedding strings
because the code is incorrectly wrapped inside of a
`if (STR_SHARED_P(obj))` clause. Shared strings can't be re-embedded
so this ends up being a no-op. This means that strings can be moved to a
large size pool during compaction, but won't be re-embedded, which would
waste the space.
Notes:
Merged: https://github.com/ruby/ruby/pull/7071
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7087
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7077
|
|
[Bug #19262]
Notes:
Merged: https://github.com/ruby/ruby/pull/7029
|
|
* [Bug #19150]
|
|
trace_arg->id is the ID of the original method of an aliased method. If
the original method is removed, then the lookup will fail. We should use
trace_arg->called_id instead, which is the ID of the aliased method.
Fixes [Bug #19305]
Notes:
Merged: https://github.com/ruby/ruby/pull/7064
|
|
It's a register spill issue. Fix by moving the Qnil fill snippet to
after registers are released.
[Bug #19299]
Notes:
Merged: https://github.com/ruby/ruby/pull/7059
|
|
Previously if any of the tests that move objects between size pools
failed to move anything, then the call to stats.dig would return `nil`
which would then cause assert_operator to error.
This should be a test Failure, rather than an Error so this commit uses
a default value of 0 if stats.dig fails to find a key.
Also refactor object movement tests to use stats.dig, rather than :[]
Notes:
Merged: https://github.com/ruby/ruby/pull/6978
|
|
|