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

chore: Add Miri workflow #636

Merged
merged 9 commits into from
Jul 11, 2024
Merged

chore: Add Miri workflow #636

merged 9 commits into from
Jul 11, 2024

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented Jul 5, 2024

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?

@andygrove andygrove changed the title WIP: add miri workflow chore: Add Miri workflow Jul 5, 2024
@andygrove andygrove marked this pull request as ready for review July 5, 2024 21:58
core/Cargo.toml Outdated
@@ -97,6 +97,7 @@ twox-hash = "1.6.3"

[features]
default = []
nightly = []
Copy link
Member Author

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)
Copy link
Member Author

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.

@@ -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),
Copy link
Member Author

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-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.47%. Comparing base (68efa57) to head (2cac6ef).
Report is 6 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@andygrove andygrove merged commit 1dc092f into apache:main Jul 11, 2024
74 checks passed
@andygrove andygrove deleted the miri branch July 11, 2024 00:33
himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
* 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
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.

Run miri checks in CI
3 participants