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 leaks in FxA FFI #89

Merged
merged 1 commit into from Jun 25, 2018
Merged

Fix leaks in FxA FFI #89

merged 1 commit into from Jun 25, 2018

Conversation

@thomcc
Copy link
Contributor

@thomcc thomcc commented Jun 23, 2018

As discussed in the standup we'd rather do this sooner than later because we might have to land the FxA bindings into android-components instead of in our monorepo.

Specifically we leaked all the strings that were returned as parts of repr(C) objects, and we leaked every Result.

This also updates it to be more like how mentat's FFI is coming along, although it goes a step further and makes handle panic from application code (if rust code panics across the FFI boundary it's undefined behavior).

And because this whole FFI thing has stressed me out immensely, and because I have basically nothing better to do, I did it this evening. IDK.

The Android part of this is thomcc@b0021de (the branch is https://github.com/thomcc/application-services/tree/sand). It's applies on top of @carolkng's patch, merges these changes in, and completes the android bindings to the FFI (so that I don't have to come back for them :P).

I don't think I can submit a PR on a branch that is off another branch without confusing github (I tried and it wanted me to be PRing the whole diff), so... yeah. It's in a separate branch instead of something else.

@thomcc thomcc requested a review from eoger Jun 23, 2018
@eoger
eoger approved these changes Jun 25, 2018
Copy link
Contributor

@eoger eoger left a comment

This is looking very good, thanks for taking the time to do this Thom.
I don't really have any significant improvement to suggest at the moment (the patch is looking good imo) and this is blocking other stuff, so let's merge this.

@eoger eoger merged commit 8efa7f3 into master Jun 25, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@thomcc thomcc mentioned this pull request Jun 25, 2018
@thomcc thomcc deleted the fxa-ffi-leakfix branch Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants