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

Document use of unsafe in utils #147

Open
alamb opened this issue Apr 26, 2021 · 0 comments
Open

Document use of unsafe in utils #147

alamb opened this issue Apr 26, 2021 · 0 comments
Labels
arrow Changes to the arrow crate security

Comments

@alamb
Copy link
Contributor

alamb commented Apr 26, 2021

Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-10978

There are ~18 uses of unsafe in src/utils and we should document them according to the guidelines in the Arrow crate README

 
{code:java}
// JUSTIFICATION
// Benefit
// Describe the benefit of using unsafe. E.g.
// "30% performance degradation if the safe counterpart is used, see bench X."
// Soundness
// Describe why the code remains sound (according to the definition of rust's unsafe code guidelines). E.g.
// "We bounded check these values at initialization and the array is immutable."
let ... = unsafe { ... }; {code}

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

No branches or pull requests

2 participants