Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix segfault calling YGJNILogFunc (#1344)
Summary: X-link: facebook/react-native#39051 Pull Request resolved: #1344 `YGJNILogFunc` has a bug where it uses a `va_list` to determine the length of a printf string, then reuses the same `va_list` later after it has already been iterated through. Even if no arguments are present, this may cause a crash looking something like: ``` C [libsystem_platform.dylib+0xf12] _platform_strlen+0x12 C [libsystem_c.dylib+0x31bf] __vfprintf+0x1339 C [libsystem_c.dylib+0x307ce] _vsnprintf+0x100 C [libsystem_c.dylib+0x6965] vsnprintf+0x44 C [libyoga.dylib+0x5161] YGJNILogFunc(YGConfig*, YGNode*, YGLogLevel, void*, char const*, __va_list_tag*)+0x59 ``` Fixing this fixes crashing unit tests which are not explicitly disabled. Reviewed By: yungsters Differential Revision: D48388548 fbshipit-source-id: 1df07061168437351f73b2570f14222c3eae27ea
- Loading branch information