Skip to content

[pull] master from ruby:master - #1353

Merged
pull[bot] merged 4 commits into
turkdevops:masterfrom
ruby:master
Aug 27, 2026
Merged

[pull] master from ruby:master#1353
pull[bot] merged 4 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Aug 27, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


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

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

byroot and others added 4 commits August 27, 2026 12:04
By guaranteeing that hints can't match `RHASH_AR_CLEARED_HINT`
we can save on checking the key for `UNDEF_P` in a bunch of places.
…N callbacks

ossl_sslctx_mark uses rb_gc_mark_movable, so the SSLContext relocates. Its VALUE
is stored in four places: the SSL_CTX's ex_data, and the callback argument of the
NPN advertise, NPN select and ALPN select callbacks. ossl_sslctx_compact updates
the first. Nothing updates the other three, so after a compaction they hold the
pre-move address.

The three callbacks all receive the SSL, and the SSL_CTX's ex_data copy is
already kept current -- so they can look the object up instead of carrying their
own copy, which leaves exactly one stored copy and one place to maintain.

Registration is one-shot (ossl_sslctx_setup returns early when self is frozen),
so the stale address is captured at the first handshake and never refreshed.

Fixes ruby/openssl#1088.

ruby/openssl@37c62449ac
On 64-bit systems, we used 4 bytes to determine if there is a collision
in the entry. This is a waste because it only needs 1 bit.

This commit separates each item in rb_id_table into three parts: items
(8 byte elements), keys (4 byte elements), and collision_table (bitmap).
This will help us save 3.875 bytes for each entry in rb_id_table. All
three parts are allocated in the same malloc buffer so there is no increase
in the number of mallocs.
@pull pull Bot locked and limited conversation to collaborators Aug 27, 2026
@pull pull Bot added the ⤵️ pull label Aug 27, 2026
@pull
pull Bot merged commit 14a257c into turkdevops:master Aug 27, 2026
0 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.

3 participants