chore: Upgrade to Rust 1.78 and fix UB issues in unsafe code#546
chore: Upgrade to Rust 1.78 and fix UB issues in unsafe code#546andygrove merged 1 commit intoapache:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #546 +/- ##
=============================================
+ Coverage 34.13% 54.71% +20.57%
+ Complexity 809 795 -14
=============================================
Files 106 103 -3
Lines 38586 9701 -28885
Branches 8566 1846 -6720
=============================================
- Hits 13172 5308 -7864
+ Misses 22674 3438 -19236
+ Partials 2740 955 -1785 ☔ View full report in Codecov by Sentry. |
| std::slice::from_raw_parts(data.get_unchecked(0), len_aligned), | ||
| seed, | ||
| ); | ||
| let mut h1 = if len_aligned > 0 { |
There was a problem hiding this comment.
Without this check we were hitting a debug assertion on the call to get_unchecked(0)
There was a problem hiding this comment.
perhaps its time to rename the variable from h1 to something meaningful?
| self.get_unchecked_mut(pos), | ||
| bucket.len(), | ||
| ); | ||
| if !bucket.is_empty() { |
There was a problem hiding this comment.
Without this check we were hitting a debug assertion when trying to copy an empty slice
There was a problem hiding this comment.
what will happen if this check doesn't satisfy? 🤔
There was a problem hiding this comment.
nvm, if its empty, we should just skip it
|
@parthchandra @kazuyukitanimura @huaxingao @comphead @viirya This is ready for review now |
Which issue does this PR close?
Builds on #558
Closes #507
Rationale for this change
Rust 1.78 has better debug assertions and highlights some bugs in our unsafe code
What changes are included in this PR?
How are these changes tested?
Existing tests