Skip to content

Fix Yoga Style equality crash for size-typed dimensions#1931

Closed
sbuggay wants to merge 1 commit into
react:mainfrom
sbuggay:export-D100189121
Closed

Fix Yoga Style equality crash for size-typed dimensions#1931
sbuggay wants to merge 1 commit into
react:mainfrom
sbuggay:export-D100189121

Conversation

@sbuggay

@sbuggay sbuggay commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Summary:
X-link: react/react-native#56429

Changelog: [Internal]

The existing lengthsEqual comparator was used for dimensions_, minDimensions_, and maxDimensions_, but these are size-typed values stored via StyleValuePool::getSize(), not length-typed. Using the wrong accessor caused crashes during style equality checks.

Added a sizeLengthsEqual helper (scalar + array overloads) that correctly calls StyleValuePool::getSize() and swapped it in for the three dimension fields in Style::operator==.

Differential Revision: D100189121

Summary:
X-link: react/react-native#56429

Changelog: [Internal]

The existing `lengthsEqual` comparator was used for `dimensions_`, `minDimensions_`, and `maxDimensions_`, but these are size-typed values stored via `StyleValuePool::getSize()`, not length-typed. Using the wrong accessor caused crashes during style equality checks.

Added a `sizeLengthsEqual` helper (scalar + array overloads) that correctly calls `StyleValuePool::getSize()` and swapped it in for the three dimension fields in `Style::operator==`.

Differential Revision: D100189121
@vercel

vercel Bot commented Apr 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
yoga-website Ready Ready Preview, Comment Apr 13, 2026 8:58pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed label Apr 13, 2026
@meta-codesync

meta-codesync Bot commented Apr 13, 2026

Copy link
Copy Markdown

@sbuggay has exported this pull request. If you are a Meta employee, you can view the originating Diff in D100189121.

@meta-codesync

meta-codesync Bot commented Apr 14, 2026

Copy link
Copy Markdown

This pull request has been merged in 3072995.

meta-codesync Bot pushed a commit to react/react-native that referenced this pull request Apr 14, 2026
Summary:
X-link: react/yoga#1931

Pull Request resolved: #56429

Changelog: [Internal]

The existing `lengthsEqual` comparator was used for `dimensions_`, `minDimensions_`, and `maxDimensions_`, but these are size-typed values stored via `StyleValuePool::getSize()`, not length-typed. Using the wrong accessor caused crashes during style equality checks.

Added a `sizeLengthsEqual` helper (scalar + array overloads) that correctly calls `StyleValuePool::getSize()` and swapped it in for the three dimension fields in `Style::operator==`.

Reviewed By: joevilches

Differential Revision: D100189121

fbshipit-source-id: 284f849d01ca7d15ca34d2dcaafaa92ee9dfd59f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant