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

unix: Check libc not os, and zero msghdr private #216

Merged
merged 1 commit into from Jan 9, 2019

Conversation

Projects
None yet
6 participants
@makepost
Copy link
Contributor

makepost commented Jan 7, 2019

Fixes #192 similarly to what audioipc-2 does. Now builds on musl.

@highfive

This comment has been minimized.

Copy link
Collaborator

highfive commented Jan 7, 2019

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @emilio (or someone else) soon.

@highfive

This comment has been minimized.

Copy link
Collaborator

highfive commented Jan 7, 2019

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
msghdr.msg_iovlen = iovec.len() as IovLen;
msghdr.msg_control = cmsg_buffer as *mut c_void;
msghdr.msg_controllen = cmsg_space as MsgControlLen;
msghdr.msg_flags = 0;

This comment has been minimized.

@dlrobertson

dlrobertson Jan 7, 2019

Collaborator

Could you wrap this into a function? E.g. new_msghdr?

This comment has been minimized.

@makepost

makepost Jan 7, 2019

Author Contributor

Sure, re-uploaded.

This comment has been minimized.

@makepost

makepost Jan 7, 2019

Author Contributor

Sorry for the noise, I seem to misunderstand how to extract this piece. Will get back to this.

@makepost makepost force-pushed the makepost:master branch 3 times, most recently from 154382b to 7b4523e Jan 7, 2019

msg_controllen: cmsg_length as MsgControlLen,
msg_flags: 0,
},
msghdr: new_msghdr(&mut iovec, cmsg_buffer, cmsg_length as MsgControlLen)

This comment has been minimized.

@dlrobertson

dlrobertson Jan 7, 2019

Collaborator

iovec is already an &mut [iovec] no need for the &mut.

@makepost makepost force-pushed the makepost:master branch from 7b4523e to cee64a7 Jan 7, 2019

@dlrobertson
Copy link
Collaborator

dlrobertson left a comment

LGTM

@jdm

This comment has been minimized.

Copy link
Member

jdm commented Jan 9, 2019

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jan 9, 2019

📌 Commit cee64a7 has been approved by jdm

@highfive highfive assigned jdm and unassigned emilio Jan 9, 2019

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jan 9, 2019

⌛️ Testing commit cee64a7 with merge 621f787...

bors-servo added a commit that referenced this pull request Jan 9, 2019

Auto merge of #216 - makepost:master, r=jdm
unix: Check libc not os, and zero msghdr private

Fixes #192 similarly to what [audioipc-2](https://github.com/djg/audioipc-2/blob/1033cf7e4b5d14a138004bbb8708b2a1c3821939/audioipc/src/msg.rs#L79) does. Now builds on musl.
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jan 9, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: jdm
Pushing 621f787 to master...

@bors-servo bors-servo merged commit cee64a7 into servo:master Jan 9, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment