Skip to content

Avoid vector insert in mixed shared children persistence test - #2009

Merged
javache merged 1 commit into
react:mainfrom
Hashim1999164:fix/gcc16-array-bounds-persistence-test
Oct 19, 2026
Merged

javache merged 1 commit into
react:mainfrom
Hashim1999164:fix/gcc16-array-bounds-persistence-test

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1934

YGPersistenceTest mixed_shared_and_owned_children used vector insert at begin plus one. GCC 16 with O2 or O3 reports a false array bounds warning, and the tests are built with warnings as errors.

The test now builds the three child pointers explicitly and passes that list to setChildren, which is the same layout without insert.

@meta-cla meta-cla Bot added the CLA Signed label Aug 19, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 19, 2026
@meta-codesync

meta-codesync Bot commented Oct 19, 2026

Copy link
Copy Markdown

@javache has imported this pull request. If you are a Meta employee, you can view this in D126040805.

@javache
javache force-pushed the fix/gcc16-array-bounds-persistence-test branch from 0a441ec to be03ffc Compare October 19, 2026 12:43
@javache
javache merged commit 7856c9b into react:main Oct 19, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build tests/YGPersistenceTest.cpp fails with array-bounds error on GCC 16 (-O2 / -O3) due to -Werror

2 participants