-
Notifications
You must be signed in to change notification settings - Fork 167
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
chore: Add Miri workflow #636
Conversation
core/Cargo.toml
Outdated
@@ -97,6 +97,7 @@ twox-hash = "1.6.3" | |||
|
|||
[features] | |||
default = [] | |||
nightly = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have some references to this feature in our code and get warnings when we run miri (which requires use of nightly Rust)
std::slice::from_raw_parts(data.get_unchecked(0), len_aligned), | ||
seed, | ||
) | ||
hash_bytes_by_int(&data[0..len_aligned], seed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a miri warning. I ran the murmur3 bench before and after this change and did not see a significant difference.
core/src/execution/sort.rs
Outdated
@@ -165,7 +165,7 @@ where | |||
// because they are defined as Vec<Vec<T>> | |||
ptr::copy_nonoverlapping( | |||
bucket.as_ptr(), | |||
self.get_unchecked_mut(pos), | |||
self.as_mut_ptr().add(pos), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a miri warning
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #636 +/- ##
============================================
+ Coverage 53.43% 53.47% +0.03%
Complexity 802 802
============================================
Files 106 106
Lines 10152 10173 +21
Branches 1911 1915 +4
============================================
+ Hits 5425 5440 +15
- Misses 3751 3755 +4
- Partials 976 978 +2 ☔ View full report in Codecov by Sentry. |
* add miri workflow * fix * ignore some tests when miri is enabled * fix one safety warning and ignore some slow tests * fmt * prepare for review * add comments * update to reflect change in directory name
Which issue does this PR close?
Closes #634
Rationale for this change
We want to ensure that our unsafe code is safe
What changes are included in this PR?
Add new workflow to run Miri checks
How are these changes tested?