Age | Commit message (Collapse) | Author |
|
When Zlib::Inflate#inflate or Zlib::Deflate#deflate is called
recursively inside the block, a crash can occur because of an
use-after-free bug.
https://github.com/ruby/zlib/commit/50fb8a0338
|
|
https://github.com/ruby/cgi/commit/c9c800715e
|
|
https://github.com/ruby/cgi/commit/052eb3a828
|
|
Make use of the check in rb_alloc_tmp_buffer2.
https://hackerone.com/reports/1328463
https://github.com/ruby/cgi/commit/c728632c1c
|
|
|
|
* Enhanced RDoc for Float#next_float
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
Implements setclassvariable in yjit. Note that this version is not
faster than the standard version because we aren't handling the inline
cache in assembly. This is still important to implement because it will
prevent yjit from exiting in methods that call both a cvar setter and
other code that yjit can compile.
Co-authored-by: Aaron Patterson tenderlove@ruby-lang.org
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
|
|
This commit adds a Ractor cache for every size pool. Previously, all VWA
allocated objects used the slowpath and locked the VM.
On a micro-benchmark that benchmarks String allocation:
VWA turned off:
29.196591 0.889709 30.086300 ( 9.434059)
VWA before this commit:
29.279486 41.477869 70.757355 ( 12.527379)
VWA after this commit:
16.782903 0.557117 17.340020 ( 4.255603)
Notes:
Merged: https://github.com/ruby/ruby/pull/5151
|
|
Dumped iseq binary can not have unnamed symbols/IDs, and ID 0 is
stored instead. As `struct rb_id_table` disallows ID 0, also for
the distinction, re-assign a new temporary ID based on the local
variable table index when loading from the binary, as well as the
parser.
Notes:
Merged: https://github.com/ruby/ruby/pull/5157
|
|
The parameter being called `req` specifically causes an assertion error:
```
Assertion failed: (key != 0), function hash_table_raw_insert, file id_table.c, line 153.
```
Renaming the parameter or removing the `*` doesn't reproduce.
Notes:
Merged: https://github.com/ruby/ruby/pull/5157
|
|
Implements [Feature #18273]
Returns an array containing the receiver's direct subclasses without
singleton classes.
Notes:
Merged: https://github.com/ruby/ruby/pull/5045
|
|
As this warning is emitted just once per processes, needs in each
files when parallel testing.
|
|
* What's Here section for Integer
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
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>
Notes:
Merged: https://github.com/ruby/ruby/pull/5156
Merged-By: XrXr
|
|
This commit adds an entry_exit field to block_t for use in
invalidate_block_version(). By patching the start of the block while
invalidating it, invalidate_block_version() can function correctly
while there is no executable memory left for new branch stubs.
This change additionally fixes correctness for situations where we
cannot patch incoming jumps to the invalidated block. In situations
such as Shopify/yjit#226, the address to the start of the block
is saved and used later, possibly after the block is invalidated.
The assume_* family of function now generate block->entry_exit before
remembering blocks for invalidation.
RubyVM::YJIT.simulate_oom! is introduced for testing out of memory
conditions. The test for it is disabled for now because OOM triggers
other failure conditions not addressed by this commit.
Fixes Shopify/yjit#226
Notes:
Merged: https://github.com/ruby/ruby/pull/5145
|
|
Treats:
#>
#>=
#<
#<=
#eql?
#nan?
#infinite?
#finite?
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4154
|
|
Updating RCLASS_PARENT_SUBCLASSES and RCLASS_MODULE_SUBCLASSES while
compacting can trigger the read barrier. This commit makes
RCLASS_SUBCLASSES a doubly linked list with a dedicated head object so
that we can add and remove entries from the list without having to touch
an object in the Ruby heap
Notes:
Merged: https://github.com/ruby/ruby/pull/5125
|
|
|
|
https://github.com/rubygems/rubygems/commit/7f22fe56b3
|
|
|
|
|
|
|
|
|
|
|
|
fix https://github.com/ruby/irb/issues/308
This bug occurred when `dialog.width - calculate_width(s, true)` was negative.
When `dialog.width` is shorter than `old_dialog.width`, it calculates how much padding it has to do. However, there are cases where `s` is longer than `dialog.width`, as in the issue. In that case, `padding_space_with_escape_sequences` will crash.
Here, `old_dialog.width` is longer than `dialog.width`, so I changed the padding width to `old_dialog.width - dialog.width`.
https://github.com/ruby/reline/commit/c581c31e0f
|
|
The implementation of a local variable tables was represented as `ID*`,
but it was very hacky: the first element is not an ID but the size of
the table, and, the last element is (sometimes) a link to the next local
table only when the id tables are a linked list.
This change converts the hacky implementation to a normal struct.
Notes:
Merged: https://github.com/ruby/ruby/pull/5136
|
|
Treated (or previously treated):
#quo
#%
#divmod
#**`
#eql?
#<=>
#==
#hash
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5152
|
|
|
|
This is the minimal correct objtostring implementation in YJIT.
For correctness, it is important that to_string not get called on strings or subclasses of string.
There is a new test for this behavior.
A follow up should implement an optimized version for other types as performed in `vm_objtostring`.
Co-authored-by: John Hawthorn <jhawthorn@github.com>
Co-authored-by: John Hawthorn <jhawthorn@github.com>
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5147
|
|
|
|
Treats:
#to_s
#coerce
#+
#-
#*
#/
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
Just duplications.
|
|
https://github.com/rubygems/rubygems/commit/3241b34055
|
|
Gemfile
https://github.com/rubygems/rubygems/commit/6a19cca7e5
|
|
https://github.com/rubygems/rubygems/commit/e896e63ac3
|
|
https://github.com/rubygems/rubygems/commit/afaf868b68
|
|
http://rubyci.s3.amazonaws.com/crossruby/crossruby-master-wasm32_emscripten/log/20211118T233311Z.log.html.gz#make
```
compiling gc.c
gc.c:10629:47: error: implicit conversion loses integer precision: 'unsigned long long' to 'size_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
SET(time, objspace->profile.total_time_ns / (1000 * 1000) /* ns -> ms */);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gc.c:10624:9: note: expanded from macro 'SET'
return attr; \
~~~~~~ ^~~~
gc.c:10629:47: error: implicit conversion loses integer precision: 'unsigned long long' to 'unsigned long' [-Werror,-Wshorten-64-to-32]
SET(time, objspace->profile.total_time_ns / (1000 * 1000) /* ns -> ms */);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gc.c:10626:68: note: expanded from macro 'SET'
rb_hash_aset(hash, gc_stat_symbols[gc_stat_sym_##name], SIZET2NUM(attr));
~~~~~~~~~ ^~~~
2 errors generated.
```
|
|
Introduce new optimized method type
`OPTIMIZED_METHOD_TYPE_STRUCT_AREF/ASET` with index information.
Notes:
Merged: https://github.com/ruby/ruby/pull/5131
|
|
Now `rb_method_optimized_t optimized` field is added to represent
optimized method type.
Notes:
Merged: https://github.com/ruby/ruby/pull/5131
|
|
@nobu pointed out that ULL (unsigned long long) should have at
least 64 bits so ULL2NUM(uint64_t) is not problem.
Notes:
Merged: https://github.com/ruby/ruby/pull/4757
|
|
* `GC.measure_total_time = true` enables total time measurement (default: true)
* `GC.measure_total_time` returns current flag.
* `GC.total_time` returns measured total time in nano seconds.
* `GC.stat(:time)` (and Hash) returns measured total time in milli seconds.
Notes:
Merged: https://github.com/ruby/ruby/pull/4757
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4757
|
|
This provides a significant speedup for symbol, true, false,
nil, and 0-9, class/module, and a small speedup in most other cases.
Speedups (using included benchmarks):
:symbol :: 60%
0-9 :: 50%
Class/Module :: 50%
nil/true/false :: 20%
integer :: 10%
[] :: 10%
"" :: 3%
One reason this approach is faster is it reduces the number of
VM instructions for each interpolated value.
Initial idea, approach, and benchmarks from Eric Wong. I applied
the same approach against the master branch, updating it to handle
the significant internal changes since this was first proposed 4
years ago (such as CALL_INFO/CALL_CACHE -> CALL_DATA). I also
expanded it to optimize true/false/nil/0-9/class/module, and added
handling of missing methods, refined methods, and RUBY_DEBUG.
This renames the tostring insn to anytostring, and adds an
objtostring insn that implements the optimization. This requires
making a few functions non-static, and adding some non-static
functions.
This disables 4 YJIT tests. Those tests should be reenabled after
YJIT optimizes the new objtostring insn.
Implements [Feature #13715]
Co-authored-by: Eric Wong <e@80x24.org>
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
Co-authored-by: Koichi Sasada <ko1@atdot.net>
Notes:
Merged: https://github.com/ruby/ruby/pull/5002
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
block to another method without having to provide a name for the
block parameter.
Implements [Feature #11256]
Co-authored-by: Yusuke Endoh mame@ruby-lang.org
Co-authored-by: Nobuyoshi Nakada nobu@ruby-lang.org
Notes:
Merged: https://github.com/ruby/ruby/pull/5051
|