-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix segfault calling YGJNILogFunc #1344
Conversation
This pull request was exported from Phabricator. Differential Revision: D48388548 |
This pull request was exported from Phabricator. Differential Revision: D48388548 |
Summary: Pull Request resolved: facebook#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: c80a703b9a294665f1305361b382c99b978fe825
b739a76
to
3fd0f96
Compare
Summary: X-link: facebook/yoga#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: 433b02d7c30227a909844e5b7d85e73e92fc5cb2
This pull request was exported from Phabricator. Differential Revision: D48388548 |
Summary: X-link: facebook/react-native#39051 Pull Request resolved: facebook#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: 97d22efb40f495c04df2d188bba6581b0eb9c7a4
3fd0f96
to
dd5f006
Compare
Summary: Pull Request resolved: facebook#39051 X-link: facebook/yoga#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: ce9c4fef23322dee2085e2545f1ed2957d72a666
This pull request was exported from Phabricator. Differential Revision: D48388548 |
Summary: X-link: facebook/react-native#39051 Pull Request resolved: facebook#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: 3a5a9dea593a40283531db52a6d2dbeeaec897c6
dd5f006
to
7805351
Compare
Summary: Pull Request resolved: facebook#39051 X-link: facebook/yoga#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: 927f14aee9ab53f108cb59e28deb5ea8a78ceac4
This pull request was exported from Phabricator. Differential Revision: D48388548 |
Summary: X-link: facebook/react-native#39051 Pull Request resolved: facebook#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
7805351
to
27f2068
Compare
Summary: Pull Request resolved: facebook#39051 X-link: facebook/yoga#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: cc2a7644d0d26e86c8092d5e6b1408014a0d2450
Summary: X-link: facebook/react-native#39051 Pull Request resolved: facebook#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: 2a653b4c9c92191e0a0b6f37701cb5297263bd8c
This pull request was exported from Phabricator. Differential Revision: D48388548 |
27f2068
to
eeda13a
Compare
Summary: Pull Request resolved: facebook#39051 X-link: facebook/yoga#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: d3f8206a3a77c622d014d38dd8f3753b67fee75b
This pull request has been merged in 38ad93c. |
Summary: X-link: facebook/react-native#39051 X-link: facebook/yoga#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: 492e7a89aeb5f9d15485ce31641875a295356bef
Summary: Pull Request resolved: #39051 X-link: facebook/yoga#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: 492e7a89aeb5f9d15485ce31641875a295356bef
Summary:
YGJNILogFunc
has a bug where it uses ava_list
to determine the length of a printf string, then reuses the sameva_list
later after it has already been iterated through. Even if no arguments are present, this may cause a crash looking something like:Fixing this fixes crashing unit tests which are not explicitly disabled.
Reviewed By: yungsters
Differential Revision: D48388548