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

[Bugfix] Fix SIGABRT in KqueueSelector #91

Merged
merged 3 commits into from May 18, 2021

Conversation

danielaRiesgo
Copy link
Contributor

@danielaRiesgo danielaRiesgo commented May 12, 2020

Fixes issue #78 , which persisted even with #83 fix.
Our team tried this fix over the #83 , so you may want to merge both of them.
We had a SIGABRT and an EXC_BAD_ACCESS before we made this fix. And after restarting simulater and this fix, the tests run smoothly (we use Embassy for UI tests).

Explanation

The array count was incorrectly used.
The documentation says:

  • Warning: Do not rely on anything about the array that is the target of this method during execution of the body closure; it might not appear to have its correct value.

Meaning we should not used kevents array in the closure. But then it continues:

Instead, use only the UnsafeMutableBufferPointer argument to body.

So we should use the pointer provided to body, not the count calculated before the function is called.

@MurrSch
Copy link

MurrSch commented Jul 13, 2020

Hi, is there any chance this will be merged?
This issue blocks me from using Ambassador.
Thanks!

@YanushKhotyan
Copy link

Hi!
Is there any chance this will be merged?
Thanks!

@Goos
Copy link
Member

Goos commented May 18, 2021

Hi @danielaRiesgo, thanks for submitting the PR. Sorry for the late response, this project hasn't been actively maintained. This change looks good though and seems in line with the swift pointer API, so I'll go ahead and merge this.

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.

None yet

5 participants