Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Guard against seg fault if replaceChild index is out of bounds (faceb…
…ook#47644) Summary: X-link: facebook/yoga#1744 We are seeing some seg faults after the new display: contents logic was added. This is either because we are passing in an out of bounds index - in which case we try to read `display_` from protected memory. Or, the `Node *` was deleted at some point without removing it from this array. I think its the out of bounds issue mainly because I am not sure where this deletion would occur I added an if to revert to the legacy, undefined behavior in this case. This is not ideal and we should find the root cause that is calling into this function improperly but for now it stops apps from crashing on the `replaceChild` call Changelog: [Internal] Reviewed By: rozele Differential Revision: D66038645
- Loading branch information