Repository navigation
conformance shim: honour platform_is c_long_size - #425
Merged
Merged
Conversation
The shim understood :wordsize and :pointer_size and ignored
:c_long_size, so every example a spec had guarded for a platform with a
narrower C long ran here anyway.
One of them cost 6 GB. shared/string/times.rb asks a 32-bit platform to
refuse "abc" * ((2 ** 31) - 1) with ArgumentError; on a 64-bit one that
is a legal six-gigabyte string, and building it took 6.5 GB of a CI
runner's sixteen and then failed the example it could not raise from.
core/string/multiply_spec.rb 6.08 GB, pass=8 fail=1
78 MB, pass=8 fail=0
The floor moves down with it, 14900 -> 14850, and that is not a
regression. Honouring the guard stops counting 62 examples that were
never this platform's to run — and stops 299 failures that were the same
examples failing. The measured total goes 14963 -> 14896; 14850 leaves
the same cushion under it that 14900 left under 14949.
Where those numbers land, before and after:
core/array/pack/l_spec.rb pass 256 fail 140 -> pass 236 fail 0
core/string/unpack/l_spec.rb pass 288 fail 158 -> pass 246 fail 0
core/integer/size_spec.rb pass 2 fail 1 -> pass 2 fail 0
core/marshal/{load,dump} unchanged
A ratchet counting examples that do not apply to the platform is
measuring the wrong thing, and 299 permanent failures in the log are
noise a real one would hide in.
tannevaled
force-pushed
the
fix/shim-honours-c-long-size
branch
from
August 21, 2026 18:02
4725613 to
667b749
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shim understood
:wordsizeand:pointer_sizeand ignored:c_long_size, so every example a spec had guarded for a platform with a narrower Clongran here anyway.One of them cost 6 GB
shared/string/times.rbasks a 32-bit platform to refuse"abc" * ((2 ** 31) - 1)withArgumentError. On a 64-bit one that is a legal six-gigabyte string — so rbgo built it, took 6.5 GB of a CI runner's sixteen, and then failed the example it had no reason to raise from.core/string/multiply_spec.rbpass=8 fail=1pass=8 fail=0(The 64-bit example is already correct:
"abc" * ((2**63)-1)raisesArgumentError, "argument too big", exactly as ruby 3 does.)The floor moves down, and that is not a regression
Honouring the guard stops counting 62 examples that were never this platform's to run — and stops 299 failures that were the same examples failing. The measured total goes 14963 → 14896.
core/array/pack/l_spec.rbcore/string/unpack/l_spec.rbcore/integer/size_spec.rbcore/marshal/{load,dump}_spec.rbFLOORgoes 14900 → 14850, which leaves the same cushion under 14896 that 14900 left under 14949.A ratchet counting examples that do not apply to the platform is measuring the wrong thing, and 299 permanent failures in the log are noise a real one would hide in.
🤖 Generated with Claude Code