Repository navigation
test(stylexswc/rs-compiler): keep the constant chain depths far from the stack limit - #1386
Merged
Merged
Conversation
…the stack limit The release job on x86_64-unknown-linux-musl with Node 24 failed. The test for a deep constant chain used a chain of 5000 links. This depth is near the point where V8 runs out of stack. Past 256 links, the native code refuses the chain and the reference runs. The export calls the reference from one more stack frame than the npm package does. Near the limit, the export overflowed and the npm package gave a sheet. The test now uses 1000 links in place of 5000. The reference resolves this chain on all platforms. The chain of 20000 links overflows on all platforms. Each depth also names its answer, a sheet or a RangeError. Before, the test compared only the two answers. If both sides overflowed at 1000 links, the test did not show it.
… chain The comment on MAX_CONSTANT_DEPTH said that V8 runs out of stack near 10,000 links. With the default stack, a new process runs out of stack after approximately 4,500 links. The comment now gives this number and tells that it changes with the platform and the JIT tier.
Contributor
Paired revision benchmarkSuite status: pass
|
This branch was successfully deployed
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.
Description
The Release run 45480333425 failed on one job: "Test bindings on
x86_64-unknown-linux-musl - node@24.18.0". All other jobs passed. The
failed test is
processStylexRules in a child process > answers as the reference for a constant chain of any depth.The test used a chain of 5000 constants. This depth is near the point
where V8 runs out of stack. Past 256 links, the native code refuses the
chain and the reference runs. The export calls the reference from one
more stack frame than the npm package does. Near the limit, the export
overflowed with a
RangeErrorand the npm package gave a sheet.A sweep of
--stack-sizeat depth 5000 shows the problem. At 1074 KBonly, the two answers are not the same. Below this value both overflow.
Above this value both give a sheet. The product code is correct. The
test depth was the problem.
Changes:
chain of 1000 links at a stack of 300 KB to 2000 KB. A chain of 20000
links overflows at 984 KB to 3000 KB.
sheet, orerror RangeErrorat20000 links. Before, the test compared only the two answers.
MAX_CONSTANT_DEPTHsaid that V8 runs out of stacknear 10,000 links. A new process runs out after approximately 4,500
links. The comment now gives this number.
Fixes
No open issue. The failed job is in Release run 45480333425.
Type of change
not work as expected)
Checklist