| Age | Commit message (Collapse) | Author |
|
|
|
|
|
[Bug #21170]
st_table reserves -1 as a special hash value to indicate that an entry
has been deleted. So that that's a valid value to be returned from the
hash function, do_hash replaces -1 with 0 so that it is not mistaken for
the sentinel.
Previously, when upgrading an AR table to an ST table,
rb_st_add_direct_with_hash was used which did not perform the same
conversion, this could lead to a hash in a broken state where one if its
entries which was supposed to exist being marked as a tombstone.
The hash could then become further corrupted when the ST table required
resizing as the falsely tombstoned entry would be skipped but it would
be counted in num entries, leading to an uninitialized entry at index
15.
In most cases this will be really rare, unless using a very poorly
implemented custom hash function.
This also adds two debug assertions, one that st_add_direct_with_hash
does not receive the reserved hash value, and a second in
rebuild_table_with, which ensures that after we rebuild/compact a table
it contains the expected number of elements.
Co-authored-by: Alan Wu <alanwu@ruby-lang.org>
|
|
|
|
[Bug #20853] Fix Proc#hash to not change after compaction
The hash value of a Proc must remain constant after a compaction, otherwise
it may not work as the key in a hash table.
|
|
[Bug #19778] Pass additional include options to INCFLAGS in common.mk
|
|
665b4c5b2a31078d7db0173ad60daad0b463c1fd,642875e474b4e6a13770b1dbbc33d466ba5e0718,54b9b80b84760717aadb8bf67f638785ed895a58,361bce8d2c4c90a01eb3b7365a87dec0d93bb2b6: [Backport #19967]
[Bug #19967] Reset `LIBPATHENV` env after started
Not to affect other tools invoked as child processes.
---
common.mk | 3 ++-
template/Makefile.in | 3 +++
template/fake.rb.in | 3 +++
tool/fake.rb | 8 ++++++++
4 files changed, 16 insertions(+), 1 deletion(-)
[Bug #19967] Revert "configure.ac: LIBPATHENV on macOS"
This reverts commit 1961c786aab243b3eb60e7238224e87975d88056. These
environment variables should no longer propagate to child processes.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Bug #19967] Delete real path
---
tool/fake.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[Bug #19967] Ignore library before build
---
tool/fake.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
The class variable cache that was added in
https://github.com/ruby/ruby/pull/4544 changed the behavior of class
variables on cloned classes. As reported when a class is cloned AND a
class variable was set, and the class variable was read from the
original class, reading a class variable from the cloned class would
return the value from the original class.
This was happening because the IC (inline cache) is stored on the ISEQ
which is shared between the original and cloned class, therefore they
share the cache too.
To fix this we are now storing the `cref` in the cache so that we can
check if it's equal to the current `cref`. If it's different we don't
want to read from the cache. If it's the same we do. Cloned classes
don't share the same cref with their original class.
This will need to be backported to 3.1 in addition to 3.2 since the bug
exists in both versions.
We also added a marking function which was missing.
Fixes [Bug #19379]
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
|
|
|
|
common.mk: Do not invoke outdate-bundled-gems by default
If baseruby is available (and its version is different from one being
built) when compiling ruby, tool/outdate-bundled-gems.rb (which is
invoked by `make install`) wrongly deletes debug.so and rbs_extension.so
in .bundle/extension/*.
This leads to a broken installation of ruby which lacks the libraries,
which may make rubygems show the following warnings (in some additional
complex conditions):
```
$ irb
Ignoring debug-1.7.1 because its extensions are not built. Try: gem pristine debug --version 1.7.1
Ignoring rbs-2.8.2 because its extensions are not built. Try: gem pristine rbs --version 2.8.2
irb(main):001:0>
```
According to some committers, tool/outdate-bundled-gems.rb is introduced
for fixing a build issue, but the detail is not recorded. The issue
seems to occur only when debug gem or rbs gem is updated, so it is
difficult to fix the script so soon.
Tentatively, this change stops invoking the script by default.
This should be backported to ruby_3_2.
Fixes [Bug #19271]
---
common.mk | 1 -
1 file changed, 1 deletion(-)
|
|
|
|
Prepare for test-syntax-suggest after other tests finished.
|
|
I noticed this while running test_yjit with --mjit-call-threshold=1,
which redefines `Integer#<`. When Ruby is monkey-patched,
MJIT itself could be broken.
Similarly, Ruby scripts could break MJIT in many different ways. I
prepared the same set of hooks as YJIT so that we could possibly
override it and disable it on those moments. Every constant under
RubyVM::MJIT is private and thus it's an unsupported behavior though.
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7010
|
|
[Misc #19250]
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6972
|
|
|
|
|
|
|
|
SIZE_POOL_COUNT is a GC macro, it should belong in gc.h and not shape.h.
SIZE_POOL_COUNT doesn't depend on shape.h so we can have shape.h depend
on gc.h.
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/6940
|
|
* YJIT: Generate debug info in release builds
They are helpful in case we need to do core dump debugging.
* Remove Cirrus DOC skip rule
The syntax for this is weird, and escaping [ and ] cause parse failures.
Cirrus' docs said to surround with .*, but then that seems to skip
everything. Revert e0a4205eb785f266fdf08f409c2f112f5dfcb229 for now.
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
It should depends on only existing data files (except for the tools),
unless `ALWAYS_UPDATE_UNICODE=yes`.
Notes:
Merged: https://github.com/ruby/ruby/pull/6898
|
|
I see several arguments in doing so.
First they use a non trivial amount of memory, so for various memory
profiling/mapping tools it is relevant to have visibility of the space
occupied by shapes.
Then, some pathological code can create a tons of shape, so it is
valuable to have a way to have a way to observe shapes without having
to compile Ruby with `SHAPE_DEBUG=1`.
And additionally it's likely much faster to dump then this way than
to use `RubyVM::Shape`.
There are however a few open questions:
- Shapes can't respect the `since:` argument. Not sure what to do when
it is provided. Would probably make sense to not dump them.
- Maybe it would make more sense to have a separate `ObjectSpace.dump_shapes`?
- Maybe instead `dump_all` should take a `shapes: false` argument?
Additionally, `ObjectSpace.dump_shapes` is added for the use case of
debugging the evolution of the shape tree.
Notes:
Merged: https://github.com/ruby/ruby/pull/6868
|
|
Cases like this:
```ruby
obj = Object.new
loop do
obj.instance_variable_set(:@foo, 1)
obj.remove_instance_variable(:@foo)
end
```
can cause us to use many more shapes than we want (and even run out).
This commit changes the code such that when an instance variable is
removed, we'll walk up the shape tree, find the shape, then rebuild any
child nodes that happened to be below the "targetted for removal" IV.
This also requires moving any instance variables so that indexes derived
from the shape tree will work correctly.
Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
Co-authored-by: John Hawthorn <jhawthorn@github.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/6866
|
|
|
|
|
|
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6700
|
|
There's no mjit_compile.inc, so no need to use this prefix anymore.
|
|
The distinction doesn't make much difference today.
|
|
It's no longer about the compiler logic itself.
|
|
|
|
Extract new gems then remove outdated gem directories.
|
|
|
|
because it exists primarily for generating mjit_c.rb.
|
|
|
|
There are too many mjit_compiler.* files. It was hard to find files.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6594
|
|
|
|
|
|
spec/ruby/command_line/dash_v_spec.rb needs it.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6742
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
|
|
|
|
Disconnect the dependency of revision.h on the timestamp file if no
baseruby is available
Notes:
Merged: https://github.com/ruby/ruby/pull/6724
Merged-By: nobu <nobu@ruby-lang.org>
|