Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jul 21, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

altxtech and others added 16 commits July 21, 2025 15:55
There's a global id_table `rb_global_tbl` that needs a lock (I used VM lock). In the future, we might use a lock-free rb_id_table if we create such a data structure.

Reproduction script that might crash or behave strangely:

```ruby
100.times do
  Ractor.new do
    1_000_000.times do
      $stderr
      $stdout
      $stdin
      $VERBOSE
      $stderr
      $stdout
      $stdin
      $VERBOSE
      $stderr
      $stdout
      $stdin
      $VERBOSE
    end
  end
end

$myglobal0 = nil;
$myglobal1 = nil;
  # ... vim macros to the rescue
$myglobal100000 = nil;
```
Update GitHub Actions workflows to set OSSL_TEST_ALL=1.

Exclude a few slow tests that are not critical for local development,
unless OSSL_TEST_ALL=1 is set. The bindings code paths are still reached
by other tests with smaller inputs, and failures in those would likely
indicate an issue in OpenSSL rather than in the bindings.

Newly excluded tests include generating large DSA keys and measuring
CRYPTO_memcmp() timing. These tests currently take nearly half of the
total runtime.

ruby/openssl@382eca2aec
Use OpenSSL::TestCase instead of OpenSSL::SSLTestCase.

Prefer assert_true and assert_false over the bare assert and refute.
OpenSSL.fixed_length_secure_compare and OpenSSL.secure_compare will
only return true or false, and it should be checked.

ruby/openssl@3d9938ed40
rb_objspace_garbage_object_p expects only GC managed objects to be passed
in. We should skip the check if curr_key is a special constant.
We don't need to delay the freeing of the fstr for the symbol if we store
the hash of the fstr in the dynamic symbol and we use compare-by-identity
for removing the dynamic symbol from the sym_set.
If the object is garbage, then calling cmp on it may crash.
Benchmark:

    ARGV[0].to_i.times.map do
      Ractor.new do
        1_000_000.times do |i|
          "hello#{i}".to_sym
        end
      end
    end.map(&:value)

Results:

| Ractor count | Branch (s) | Master (s) |
|--------------|------------|------------|
| 1            | 0.364      | 0.401      |
| 2            | 0.555      | 1.149      |
| 3            | 0.583      | 3.890      |
| 4            | 0.680      | 3.288      |
| 5            | 0.789      | 5.107      |
If we create a key but don't insert it (due to other Ractor winning the
race), then it would leak memory if we don't free it. This introduces a
new function to free that memory for this case.
Since the hash should never change, we only need to calculate it once.
It has a bad habit of leaving a trailing space, for example for ARM
`ret`.
Previously `no_dead_mov_from_vreg` generated:

    0x0: ldur x0, [x0]
    0x4: mov x0, x0
    0x8: ret

Because of phase ordering. Split couldn't recognize that the no-op mov
because at that point it sees a `VReg`.
@pull pull bot locked and limited conversation to collaborators Jul 21, 2025
@pull pull bot added the ⤵️ pull label Jul 21, 2025
@pull pull bot merged commit 3bbdcf0 into turkdevops:master Jul 21, 2025
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants