Skip to content

fix segfault when watcher is moved. #33#35

Merged
passcod merged 2 commits intonotify-rs:masterfrom
andelf:fix-fsevent-segfault
Oct 24, 2015
Merged

fix segfault when watcher is moved. #33#35
passcod merged 2 commits intonotify-rs:masterfrom
andelf:fix-fsevent-segfault

Conversation

@andelf
Copy link
Contributor

@andelf andelf commented Oct 22, 2015

  • FsEventWatch.context:: Option<StreamContextInfo> is used for passing channels to watch thread.
  • When FsEventWatch moves, its address changes, so c callback fails.
  • Fix: add Box<> wrapper to StreamContextInfo

FsEventWatch.context:: Option<StreamContextInfo> is used for passing channels to watch thread.
When FsEventWatch moves, its address changes, so c callback will fail.
Fix: add Box<> wrapper to StreamContextInfo
@octplane
Copy link
Contributor

I can confirm the PR fixes the sefgault caused by https://github.com/octplane/rsnotify-33

@TyOverby
Copy link
Contributor

🎉

I'll try this on my application that exposed the bug later today and report back.

@octplane
Copy link
Contributor

Thanx @TyOverby

@TyOverby
Copy link
Contributor

@octplane @andelf

Oops, I posted this in the issue thread, but I tried it out on my application and it worked!

🎉

@andelf
Copy link
Contributor Author

andelf commented Oct 24, 2015

@passcod :) ok to merge.

passcod added a commit that referenced this pull request Oct 24, 2015
Fixes #33: Segfault when watcher is moved
@passcod passcod merged commit 5a48333 into notify-rs:master Oct 24, 2015
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.

4 participants