Skip to content
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 crash of iOS FlipperNetworkPlugin #563

Closed

Conversation

LAgagggggg
Copy link
Contributor

Summary

Flipper's network plugin may cause crash on a frequency of about one time per 1~2 days(I think it depends on how many network request we send).
IMG_3095

I assume the crash is caused by part of the code of HTTPParser is not thread-safe, and invoke it asynchronously may cause double-free crash. So I manually ask for HTTPBody synchronously, make the HTTPParser parse the request and cache them in advance, before any possible asynchronous invoking.

Changelog

Fix potential crash cause by network plugin.

Test Plan

  1. Run our App with Flipper integrated
  2. Make sure FlipperNetworkPlugin is active
  3. It may take days to reproduce the crash

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Sep 27, 2019
@priteshrnandgaonkar
Copy link
Contributor

Thanks for the PR. I will have a look in few days.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@priteshrnandgaonkar has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@priteshrnandgaonkar merged this pull request in 0ba47d9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants