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 some leaks and types in fsevent-sys #32

Merged
merged 4 commits into from
May 12, 2021
Merged

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Apr 30, 2021

As best as I can tell, CFURLCreateFileReferenceURL and CFURLCreateFilePathURL
do not free the passed in url upon error. This change makes sure we release the
url on success or failure.

erickt added 4 commits May 11, 2021 11:55
This makes sure that str_path_to_cfstring_ref handles errors in all
codepaths, and doesn't leak resources upon failure.
@erickt erickt changed the title Fix leaking urls upon errors Fix some leaks and types in fsevent-sys May 12, 2021
@octplane
Copy link
Owner

Thanks for all these changes! 🙇🏻

@octplane octplane merged commit a92a8c9 into octplane:master May 12, 2021
Copy link
Owner

@octplane octplane left a comment

Choose a reason for hiding this comment

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

I have reverted 8835fa0 for now as it's crashing the tests on my machine:

running 4 tests
error: test failed, to rerun pass '--test fsevent'
Caused by:
  process didn't exit successfully: `/Users/pierre.baillet/src/mine/fsevent-rust/target/debug/deps/fsevent-86fef05a90526088` (signal: 4, SIGILL: illegal instruction)

cc @erickt

@octplane
Copy link
Owner

octplane commented May 12, 2021

I have pushed back most of the changes, except the loop part that's creating the issue. I'll try and have a look later...

@octplane
Copy link
Owner

I've have pushed a fix with your code b17d5ee#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R385, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants