Commit graph

93369 commits

Author SHA1 Message Date
Peter Zhu
d025bc230c Remove duplicated line of code in thread_sync.c
Some checks failed
Windows / Windows 2022/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (test-bundled-gems) (push) Waiting to run
Windows / result (push) Blocked by required conditions
Ubuntu on WSL / wsl (push) Waiting to run
BASERUBY Check / BASERUBY (push) Failing after 52s
Compilations / omnibus compilations, trigger (push) Failing after 53s
parse.y / make (test-bundler-parallel) (push) Failing after 56s
Compilations / omnibus compilations, #2 (push) Has been skipped
Compilations / omnibus compilations, #3 (push) Has been skipped
Compilations / omnibus compilations, #7 (push) Has been skipped
Compilations / omnibus compilations, #9 (push) Has been skipped
Compilations / omnibus compilations, #10 (push) Has been skipped
Compilations / omnibus compilations, #12 (push) Has been skipped
Annocheck / test-annocheck (push) Failing after 59s
Check Dependencies / Dependency checks (push) Failing after 56s
CodeQL / Analyze (push) Failing after 56s
Misc / Miscellaneous checks (push) Failing after 1m7s
Update default gems list / Update default gems list (push) Has been skipped
parse.y / make (test-bundled-gems) (push) Failing after 53s
parse.y / make (check) (push) Failing after 55s
Rubyspec Version Guards Check / Rubyspec (push) Failing after 56s
Compilations / omnibus compilations, #1 (push) Has been skipped
WebAssembly / make (map[debugflags: name:O2 optflags:-O2 wasmoptflags:-O2]) (push) Failing after 53s
Compilations / omnibus compilations, #4 (push) Has been skipped
Compilations / omnibus compilations, #5 (push) Has been skipped
Compilations / omnibus compilations, #6 (push) Has been skipped
Compilations / omnibus compilations, #8 (push) Has been skipped
Compilations / omnibus compilations, #11 (push) Has been skipped
Compilations / omnibus compilations, result (push) Successful in 59s
2025-08-14 21:51:43 -04:00
BurdetteLamar
b0cd89a5b5 [DOC] Tweaks for GC.stress and GC.stress= 2025-08-14 21:51:21 -04:00
Burdette Lamar
12e42f72ae
[DOC] Tweaks for GC.stat 2025-08-14 21:47:39 -04:00
Takashi Kokubun
5e8f9ea495
Increase timeout for a flaky test (#14233)
4813128455
2025-08-14 23:41:01 +00:00
Takashi Kokubun
70b4b6fea0
Do not skip CI when it mentions "document" (#14232) 2025-08-14 15:12:46 -07:00
Takashi Kokubun
e305a6721e
Skip an unstable Ractor test for macOS (#14231)
4812866725
2025-08-14 15:09:35 -07:00
Takashi Kokubun
9cf27e0a42
Increase timeout for a flaky test (#14228)
4812138213
2025-08-14 14:54:12 -07:00
Takashi Kokubun
9bbd24977d
Fix a static assertion incompatible with C++98 (#14229) 2025-08-14 14:52:59 -07:00
Alan Wu
38558dd95e YJIT: Fix defined?(yield) and block_given? at top level
Previously, YJIT returned truthy for the block given query at the top
level. That's incorrect because the top level script never receives a
block, and `yield` is a syntax error there.

Inside methods, the number of hops to get from `iseq` to
`iseq->body->local_iseq` is the same as the number of
`VM_ENV_PREV_EP(ep)` hops to get to an environment with
`VM_ENV_FLAG_LOCAL`. YJIT and the interpreter both rely on this as can
be seen in get_lvar_level(). However, this identity does not hold for
the top level frame because of vm_set_eval_stack(), which sets up
`TOPLEVEL_BINDING`.

Since only methods can take a block that `yield` goes to, have ISEQs
that are the child of a non-method ISEQ return falsy for the block given
query. This fixes the issue for the top level script and is an
optimization for non-method contexts such as inside `ISEQ_TYPE_CLASS`.
2025-08-14 17:01:11 -04:00
Alan Wu
b080fcd3cd ZJIT: Fix assert failure on JIT combo build
Previously, when `./configure --enable-yjit=dev --enable-zjit` JIT_DESCRIPTION was
defined to be "ZJIT", but when running with `--yjit`, ruby_set_yjit_description()
calls `define_ruby_description("+YJIT dev")`, which is longer than the
following assertion expects:

    RUBY_ASSERT(n <= ruby_description_opt_point + (int)rb_strlen_lit(JIT_DESCRIPTION));

Use the concatenation of the two strings -- the contents of the string
is never used. Minimize the scope of the macro, too.
2025-08-14 15:38:52 -04:00
Alan Wu
fdb831fdfc ZJIT: Look for RUBY_ZJIT_ENABLE in combo build with YJIT 2025-08-14 15:38:52 -04:00
Takashi Kokubun
88d71eb04d Skip an unstable test for s390x and windows
Some checks failed
Windows / Windows 11-arm/Visual C++ (btest test-basic test-tool) (push) Waiting to run
Windows / Windows 2022/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (test-bundled-gems) (push) Waiting to run
Windows / result (push) Blocked by required conditions
Ubuntu on WSL / wsl (push) Waiting to run
Annocheck / test-annocheck (push) Failing after 56s
BASERUBY Check / BASERUBY (push) Failing after 52s
Check Dependencies / Dependency checks (push) Failing after 56s
Misc / Miscellaneous checks (push) Failing after 59s
Compilations / omnibus compilations, trigger (push) Failing after 52s
Update default gems list / Update default gems list (push) Has been skipped
CodeQL / Analyze (push) Failing after 56s
parse.y / make (check) (push) Failing after 56s
parse.y / make (test-bundled-gems) (push) Failing after 56s
WebAssembly / make (map[debugflags: name:O2 optflags:-O2 wasmoptflags:-O2]) (push) Failing after 56s
parse.y / make (test-bundler-parallel) (push) Failing after 1m0s
Compilations / omnibus compilations, #1 (push) Has been skipped
Compilations / omnibus compilations, #2 (push) Has been skipped
Compilations / omnibus compilations, #3 (push) Has been skipped
Compilations / omnibus compilations, #4 (push) Has been skipped
Compilations / omnibus compilations, #5 (push) Has been skipped
Compilations / omnibus compilations, #6 (push) Has been skipped
Compilations / omnibus compilations, #7 (push) Has been skipped
Compilations / omnibus compilations, #8 (push) Has been skipped
Compilations / omnibus compilations, #9 (push) Has been skipped
Compilations / omnibus compilations, #10 (push) Has been skipped
Compilations / omnibus compilations, #11 (push) Has been skipped
Compilations / omnibus compilations, #12 (push) Has been skipped
Compilations / omnibus compilations, result (push) Successful in 59s
4810836680
4810964104
2025-08-14 11:23:12 -07:00
Takashi Kokubun
68682a5d2b Increase timeout for failing tests
4810380996
4810287683
2025-08-14 11:23:12 -07:00
Étienne Barrié
5aa5112443 Fix documentation about struct RData's data field
Also adds a static assertion to ensure the documented behavior stays
true, namely that the data field is at the same position in the RData
and RTypedData structs.
2025-08-14 19:53:04 +02:00
Earlopain
a04555c8ab [ruby/prism] Be more defensive in the parser translator lexer
Generally I have been good about safely accessing the tokens but failed
to properly guard against no tokens in places
where it could theoretically happen through invalid syntax.

I added a test case for one occurance, other changes are theoretical only.

4a3866af19
2025-08-14 15:42:33 +00:00
Takashi Kokubun
a677220aba
ZJIT: Stop duplicating context-less side exits (#14215) 2025-08-14 08:31:23 -07:00
Nobuyoshi Nakada
c30d900547
Revert "[DOC] Try the latest RDoc"
Some checks failed
Windows / Windows 2022/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (test-bundled-gems) (push) Waiting to run
Windows / result (push) Blocked by required conditions
BASERUBY Check / BASERUBY (push) Has been skipped
Check Dependencies / Dependency checks (push) Failing after 58s
Misc / Miscellaneous checks (push) Failing after 1m2s
CodeQL / Analyze (push) Has been skipped
Ubuntu on WSL / wsl (push) Waiting to run
Annocheck / test-annocheck (push) Has been skipped
Compilations / omnibus compilations, trigger (push) Has been skipped
Update default gems list / Update default gems list (push) Has been skipped
parse.y / make (check) (push) Has been skipped
parse.y / make (test-bundler-parallel) (push) Has been skipped
parse.y / make (test-bundled-gems) (push) Has been skipped
WebAssembly / make (map[debugflags: name:O2 optflags:-O2 wasmoptflags:-O2]) (push) Has been skipped
Compilations / omnibus compilations, #1 (push) Has been skipped
Compilations / omnibus compilations, #2 (push) Has been skipped
Compilations / omnibus compilations, #3 (push) Has been skipped
Compilations / omnibus compilations, #4 (push) Has been skipped
Compilations / omnibus compilations, #5 (push) Has been skipped
Compilations / omnibus compilations, #6 (push) Has been skipped
Compilations / omnibus compilations, #7 (push) Has been skipped
Compilations / omnibus compilations, #8 (push) Has been skipped
Compilations / omnibus compilations, #9 (push) Has been skipped
Compilations / omnibus compilations, #10 (push) Has been skipped
Compilations / omnibus compilations, #11 (push) Has been skipped
Compilations / omnibus compilations, #12 (push) Has been skipped
bundled_gems / update (push) Failing after 1m51s
Compilations / omnibus compilations, result (push) Successful in 1m0s
This reverts commit 8f6f9e88c7.
Confirmed to work as expected, wait until the rdoc is released.
2025-08-14 13:54:46 +09:00
Nobuyoshi Nakada
21be7417d5
[DOC] Fix quoting 2025-08-14 13:06:38 +09:00
Ryan Davis
83a2860484 [ruby/resolv] Require rbconfig in resolv.rb
Uses ::RbConfig::CONFIG['host_os']

Found with ruby --disable-gems -e '...'

5a5a81ce98
2025-08-14 03:52:31 +00:00
Nobuyoshi Nakada
9b576cd625 Extract ruby_api_version_name 2025-08-14 12:39:19 +09:00
Takashi Kokubun
c8233db221
Ignore net-imap failures on Windows (#14216)
Some checks failed
Annocheck / test-annocheck (push) Failing after 1m2s
Check Dependencies / Dependency checks (push) Failing after 58s
Misc / Miscellaneous checks (push) Failing after 1m0s
CodeQL / Analyze (push) Failing after 56s
parse.y / make (test-bundled-gems) (push) Failing after 57s
parse.y / make (test-bundler-parallel) (push) Failing after 55s
WebAssembly / make (map[debugflags: name:O2 optflags:-O2 wasmoptflags:-O2]) (push) Failing after 53s
Compilations / omnibus compilations, #1 (push) Has been skipped
Compilations / omnibus compilations, #2 (push) Has been skipped
Compilations / omnibus compilations, #3 (push) Has been skipped
Compilations / omnibus compilations, #6 (push) Has been skipped
Compilations / omnibus compilations, #10 (push) Has been skipped
Windows / Windows 11-arm/Visual C++ (btest test-basic test-tool) (push) Waiting to run
Windows / Windows 2022/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (test-bundled-gems) (push) Waiting to run
Windows / result (push) Blocked by required conditions
Ubuntu on WSL / wsl (push) Waiting to run
BASERUBY Check / BASERUBY (push) Failing after 53s
Compilations / omnibus compilations, trigger (push) Failing after 53s
Update default gems list / Update default gems list (push) Has been skipped
parse.y / make (check) (push) Failing after 56s
Compilations / omnibus compilations, #4 (push) Has been skipped
Compilations / omnibus compilations, #5 (push) Has been skipped
Compilations / omnibus compilations, #7 (push) Has been skipped
Compilations / omnibus compilations, #8 (push) Has been skipped
Compilations / omnibus compilations, #9 (push) Has been skipped
Compilations / omnibus compilations, #11 (push) Has been skipped
Compilations / omnibus compilations, #12 (push) Has been skipped
Compilations / omnibus compilations, result (push) Successful in 1m0s
2025-08-13 17:59:50 -07:00
Takashi Kokubun
cb281653ad
ZJIT: Enable or remove comments from YJIT (#14214) 2025-08-13 17:32:29 -07:00
Jeremy Drake
c9346a166c [ruby/resolv] win32/resolv: add headers to GetNetworkParams check.
On 32-bit Cygwin at least, it was failing to find that function,
presumably due to it being stdcall.

Signed-off-by: Jeremy Drake <github@jdrake.com>

bceafef74b
2025-08-13 22:13:53 +00:00
Stan Lo
549a326f86
ZJIT: Implement StringIntern codegen (#14207)
* ZJIT: Add test and implement display for StringIntern HIR

Co-authored-by: Emily Samp <emily.samp@shopify.com>

* ZJIT: Implement StringIntern codegen

Co-authored-by: Emily Samp <emily.samp@shopify.com>

* ZJIT: Fix StringIntern's return type

---------

Co-authored-by: Emily Samp <emily.samp@shopify.com>
2025-08-13 13:04:01 -07:00
Stan Lo
2b16f27a35
ZJIT: Fix ObjToString rewrite (#14196)
ZJIT: Fix ObjToString rewrite

Currently, the rewrite for `ObjToString` always replaces it with a
`SendWithoutBlock(to_s)` instruction when the receiver is not a
string literal. This is incorrect because it calls `to_s` on the
receiver even if it's already a string.

This change fixes it by:
- Avoiding the `SendWithoutBlock(to_s)` rewrite
- Implement codegen for `ObjToString`
2025-08-13 13:03:26 -07:00
BurdetteLamar
ff622978d0 [DOC] Tweaks for GC total time methods
Some checks failed
Windows / Windows 11-arm/Visual C++ (btest test-basic test-tool) (push) Waiting to run
Windows / Windows 2022/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (test-bundled-gems) (push) Waiting to run
Windows / result (push) Blocked by required conditions
Ubuntu on WSL / wsl (push) Waiting to run
Annocheck / test-annocheck (push) Has been skipped
BASERUBY Check / BASERUBY (push) Has been skipped
parse.y / make (test-bundler-parallel) (push) Has been skipped
Check Dependencies / Dependency checks (push) Failing after 58s
CodeQL / Analyze (push) Has been skipped
Compilations / omnibus compilations, trigger (push) Has been skipped
Misc / Miscellaneous checks (push) Failing after 1m3s
Update default gems list / Update default gems list (push) Has been skipped
parse.y / make (check) (push) Has been skipped
parse.y / make (test-bundled-gems) (push) Has been skipped
WebAssembly / make (map[debugflags: name:O2 optflags:-O2 wasmoptflags:-O2]) (push) Has been skipped
Compilations / omnibus compilations, #1 (push) Has been skipped
Compilations / omnibus compilations, #2 (push) Has been skipped
Compilations / omnibus compilations, #3 (push) Has been skipped
Compilations / omnibus compilations, #4 (push) Has been skipped
Compilations / omnibus compilations, #5 (push) Has been skipped
Compilations / omnibus compilations, #6 (push) Has been skipped
Compilations / omnibus compilations, #7 (push) Has been skipped
Compilations / omnibus compilations, #8 (push) Has been skipped
Compilations / omnibus compilations, #9 (push) Has been skipped
Compilations / omnibus compilations, #10 (push) Has been skipped
Compilations / omnibus compilations, #11 (push) Has been skipped
Compilations / omnibus compilations, #12 (push) Has been skipped
Compilations / omnibus compilations, result (push) Successful in 58s
2025-08-13 14:42:17 -04:00
Max Bernstein
943d9f828d ZJIT: Don't eliminate NewHash with operands
Hashing and checking operands for equality is re-entrant. We could later
optimize this to check for hash/eq methods on operands and eliminate if
they don't have side effects, but this is fine for now.
2025-08-13 14:01:34 -04:00
Jean Boussier
2083fa89fc Implement gen_fields_tbl cache
There is a high likelyhood that `rb_obj_fields` is called
consecutively for the same object.

If we keep a cache of the last IMEMO/fields we interacted with,
we can save having to lookup the `gen_fields_tbl`, synchronize
the VM lock, etc.

On yjit-bench's, I instrumented the hit rate of this cache at:

  - `shipit`: 38%, with 111k hits.
  - `lobsters`: 59%, with 367k hits.
  - `rubocop`: 100% with only 300 hits.

I also ran a micro-benchmark which shows that ivar access is:

  - 1.25x faster when the cache is hit in single ractor mode.
  - 2x faster when the cache is hit in multi ractor mode.
  - 1.06x slower when the cache miss in single ractor mode.
  - 1.01x slower when the cache miss in multi ractor mode.

```yml
prelude: |
  class GenIvar < Array
    def initialize(...)
      super
      @iv = 1
    end

    attr_reader :iv
  end

  a = GenIvar.new
  b = GenIvar.new
benchmark:
  hit: a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv; a.iv;
  miss: a.iv; b.iv; a.iv; b.iv; a.iv; b.iv; a.iv; b.iv; a.iv; b.iv; a.iv; b.iv; a.iv; b.iv; a.iv; b.iv; a.iv; b.iv; a.iv; b.iv;
```

Single ractor:
```
compare-ruby: ruby 3.5.0dev (2025-08-12T02:14:57Z master 428937a536) +YJIT +PRISM [arm64-darwin24]
built-ruby: ruby 3.5.0dev (2025-08-12T09:25:35Z gen-fields-cache 9456c35893) +YJIT +PRISM [arm64-darwin24]
warming up..

|      |compare-ruby|built-ruby|
|:-----|-----------:|---------:|
|hit   |      4.090M|    5.121M|
|      |           -|     1.25x|
|miss  |      3.756M|    3.534M|
|      |       1.06x|         -|
```

Multi-ractor:
```
compare-ruby: ruby 3.5.0dev (2025-08-12T02:14:57Z master 428937a536) +YJIT +PRISM [arm64-darwin24]
built-ruby: ruby 3.5.0dev (2025-08-12T09:25:35Z gen-fields-cache 9456c35893) +YJIT +PRISM [arm64-darwin24]
warming up..

|      |compare-ruby|built-ruby|
|:-----|-----------:|---------:|
|hit   |      2.205M|    4.460M|
|      |           -|     2.02x|
|miss  |      2.117M|    2.094M|
|      |       1.01x|         -|
```
2025-08-13 19:54:56 +02:00
Jean Boussier
10aa4134d4 imemo_fields: store owner object in RBasic.klass
It is much more convenient than storing the klass, especially
when dealing with `object_id` as it allows to update the id2ref
table without having to dereference the owner, which may be
garbage at that point.
2025-08-13 19:53:18 +02:00
Max Bernstein
ad12db4b3d ZJIT: Only validate HIR in debug mode 2025-08-13 13:52:41 -04:00
Peter Zhu
31ff07ed1e Add link to Ruby options doc in help text
Adds link to https://docs.ruby-lang.org/en/master/ruby/options_md.html in
Ruby help text (-h and --help).
2025-08-13 11:24:50 -04:00
Burdette Lamar
7595ac9a9e
[DOC] Tweaks for GC.count 2025-08-13 10:53:22 -04:00
Kazuhiro NISHIYAMA
40d07f268e [DOC] Move Therad#join under Thread in NEWS-3.0.0.md
Some checks failed
Update default gems list / Update default gems list (push) Has been skipped
Misc / Miscellaneous checks (push) Failing after 1m4s
2025-08-13 11:45:18 +09:00
Stan Lo
df7d9812cc
ZJIT: Prepare non-leaf calls for SetGlobal (#14197)
Some checks failed
Windows / Windows 11-arm/Visual C++ (btest test-basic test-tool) (push) Waiting to run
Windows / Windows 2022/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (test-bundled-gems) (push) Waiting to run
Windows / result (push) Blocked by required conditions
Ubuntu on WSL / wsl (push) Waiting to run
Annocheck / test-annocheck (push) Failing after 59s
Check Dependencies / Dependency checks (push) Failing after 56s
Misc / Miscellaneous checks (push) Failing after 1m4s
CodeQL / Analyze (push) Failing after 56s
Compilations / omnibus compilations, trigger (push) Failing after 52s
Update default gems list / Update default gems list (push) Has been skipped
parse.y / make (check) (push) Failing after 56s
parse.y / make (test-bundled-gems) (push) Failing after 56s
parse.y / make (test-bundler-parallel) (push) Failing after 57s
WebAssembly / make (map[debugflags: name:O2 optflags:-O2 wasmoptflags:-O2]) (push) Failing after 1m1s
Compilations / omnibus compilations, #5 (push) Has been skipped
Compilations / omnibus compilations, #6 (push) Has been skipped
Compilations / omnibus compilations, #8 (push) Has been skipped
Compilations / omnibus compilations, #10 (push) Has been skipped
Compilations / omnibus compilations, #11 (push) Has been skipped
BASERUBY Check / BASERUBY (push) Failing after 52s
Compilations / omnibus compilations, #1 (push) Has been skipped
Compilations / omnibus compilations, #2 (push) Has been skipped
Compilations / omnibus compilations, #3 (push) Has been skipped
Compilations / omnibus compilations, #4 (push) Has been skipped
Compilations / omnibus compilations, #7 (push) Has been skipped
Compilations / omnibus compilations, #9 (push) Has been skipped
Compilations / omnibus compilations, #12 (push) Has been skipped
Compilations / omnibus compilations, result (push) Successful in 1m14s
When trace_var is used, setting a global variable can cause exceptions
to be raised. We need to prepare for that.
2025-08-12 17:39:46 -07:00
Luke Gruber
1afc07e815 Allow encodings to be autoloaded through transcoding functions
Make sure VM lock is not held when calling `load_transcoder_entry`, as
that causes deadlock inside ractors. `String#encode` now works inside
ractors, among others.

Atomic load the rb_encoding_list

Without this, wbcheck would sometimes hit a missing write barrier.

Co-authored-by: John Hawthorn <john.hawthorn@shopify.com>

Hold VM lock when iterating over global_enc_table.names

This st_table can be inserted into at runtime when autoloading
encodings.

minor optimization when calling Encoding.list
2025-08-12 15:19:02 -07:00
BurdetteLamar
31e8a9fced [DOC] Tweaks for GC.latest_gc_info 2025-08-12 17:06:15 -04:00
BurdetteLamar
8b530e1282 [DOC] Tweaks for GC.enable 2025-08-12 17:04:25 -04:00
BurdetteLamar
b934f989b9 [DOC] Tweaks for GC.disable 2025-08-12 17:04:06 -04:00
Takashi Kokubun
231407c251
ZJIT: Avoid compiling failed ISEQs repeatedly (#14195) 2025-08-12 13:40:42 -07:00
Jean Boussier
360be94d04 RTypedData: keep direct reference to IMEMO/fields
Similar to f3206cc79b but for TypedData.

It's quite common for TypedData objects to have a mix of reference in
their struct and some ivars.
Since we do happen to have 8B free in the RtypedData struct, we could
use it to keep a direct reference to the IMEMO/fields saving having
to synchronize the VM and lookup the `gen_fields_tbl` on every ivar
access.

For old school Data classes however, we don't have free space, but
this API is soft-deprecated and no longer very common.
2025-08-12 21:57:16 +02:00
Jean Boussier
85c52079aa set.c: Store set_table->bins at the end of set_table->entries
This saves one pointer in `struct set_table`, which would allow
`Set` objects to still fit in 80B TypedData slots even if RTypedData
goes from 32B to 40B large.

The existing set benchmark seem to show this doesn't have a very
significant impact. Smaller sets are a bit faster, larger sets
a bit slower.

It seem consistent over multiple runs, but it's unclear how much
of that is just error margin.

```
compare-ruby: ruby 3.5.0dev (2025-08-12T02:14:57Z master 428937a536) +YJIT +PRISM [arm64-darwin24]
built-ruby: ruby 3.5.0dev (2025-08-12T07:22:26Z set-entries-bounds da30024fdc) +YJIT +PRISM [arm64-darwin24]
warming up........

|                         |compare-ruby|built-ruby|
|:------------------------|-----------:|---------:|
|new_0                    |     15.459M|   15.823M|
|                         |           -|     1.02x|
|new_10                   |      3.484M|    3.574M|
|                         |           -|     1.03x|
|new_100                  |    546.992k|  564.679k|
|                         |           -|     1.03x|
|new_1000                 |     49.391k|   48.169k|
|                         |       1.03x|         -|
|aref_0                   |     18.643M|   19.350M|
|                         |           -|     1.04x|
|aref_10                  |      5.941M|    6.006M|
|                         |           -|     1.01x|
|aref_100                 |    822.197k|  814.219k|
|                         |       1.01x|         -|
|aref_1000                |     83.230k|   79.411k|
|                         |       1.05x|         -|
```
2025-08-12 21:56:57 +02:00
Kazuki Yamaguchi
507b1e4bde [ruby/openssl] pkey: skip tests using invalid keys in the FIPS mode
Some checks failed
parse.y / make (check) (push) Failing after 55s
Windows / Windows 2022/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (check) (push) Waiting to run
Windows / Windows 2025/Visual C++ 2022 (test-bundled-gems) (push) Waiting to run
Windows / result (push) Blocked by required conditions
Ubuntu on WSL / wsl (push) Waiting to run
Annocheck / test-annocheck (push) Failing after 56s
Check Dependencies / Dependency checks (push) Failing after 59s
Update default gems list / Update default gems list (push) Has been skipped
CodeQL / Analyze (push) Failing after 55s
BASERUBY Check / BASERUBY (push) Failing after 52s
Misc / Miscellaneous checks (push) Failing after 1m1s
bundled_gems / update (push) Failing after 1m52s
Compilations / omnibus compilations, trigger (push) Failing after 52s
Compilations / omnibus compilations, #4 (push) Has been skipped
Compilations / omnibus compilations, #5 (push) Has been skipped
Compilations / omnibus compilations, #6 (push) Has been skipped
Compilations / omnibus compilations, #7 (push) Has been skipped
parse.y / make (test-bundled-gems) (push) Failing after 55s
WebAssembly / make (map[debugflags: name:O2 optflags:-O2 wasmoptflags:-O2]) (push) Failing after 55s
parse.y / make (test-bundler-parallel) (push) Failing after 56s
Compilations / omnibus compilations, #1 (push) Has been skipped
Compilations / omnibus compilations, #2 (push) Has been skipped
Compilations / omnibus compilations, #3 (push) Has been skipped
Compilations / omnibus compilations, #12 (push) Has been skipped
Compilations / omnibus compilations, #8 (push) Has been skipped
Compilations / omnibus compilations, #9 (push) Has been skipped
Compilations / omnibus compilations, #10 (push) Has been skipped
Compilations / omnibus compilations, #11 (push) Has been skipped
Compilations / omnibus compilations, result (push) Successful in 1m7s
In OpenSSL's master branch, importing/loading a key in the FIPS mode
automatically performs a pair-wise consistency check. This breaks tests
for OpenSSL::PKey::EC#check_key and DH#params_ok? as they use
deliberately invalid keys. These methods would not be useful in the
FIPS mode anyway.

Fixes https://github.com/ruby/openssl/issues/926

25ad8f4bdb
2025-08-12 18:08:37 +00:00
John Hawthorn
4cf05ea77a Replace stdatomic ops with explicit mem order
My previous pass missed these atomic operations using operators.
2025-08-12 10:38:00 -07:00
John Hawthorn
cb360b0b4b Implement rbimpl_atomic_value_load
This only adds the rbimpl_ version to include/ruby/atomic.h so that it
is not a new public interface.

We were already using RUBY_ATOMIC_VALUE_LOAD in a few locations. This
will allow us to use other memory orders internally when desired.
2025-08-12 10:38:00 -07:00
John Hawthorn
77d29ef73c Convert ATOMIC_LOAD_RELAXED to use new rbimpl_* 2025-08-12 10:38:00 -07:00
John Hawthorn
1d9f76096e Update rbimpl_atomic_* to all take a memory order 2025-08-12 10:38:00 -07:00
John Hawthorn
2f95eb4e80 Rename rbimpl_atomic.*_set to _store
"store" is the terminology the C11 standard uses, which allows us to use
this as a fallback.

This only changes the private rbimpl_ version of the method,
RUBY_ATOMIC_SET et al. keep the same name.
2025-08-12 10:38:00 -07:00
Peter Zhu
a9230e76ee Make Enumerator::Product write-barrier protected 2025-08-12 13:32:41 -04:00
Peter Zhu
3e1e2bda49 Make Enumerator::Chain write-barrier protected 2025-08-12 13:32:41 -04:00
Max Bernstein
998be6b3a4
ZJIT: Add flag to disable the HIR optimizer (#14181)
Also add a check in the bisect script that can assign blame to the HIR
optimizer.
2025-08-12 13:00:22 -04:00