Skip to content

Commit

Permalink
Remove miri ignores
Browse files Browse the repository at this point in the history
These only warn now:

```
test maps::hash_map::hash_map::tests::test_iter ... warning: integer-to-pointer cast
   --> aya/src/maps/hash_map/hash_map.rs:304:15
    |
304 |         match unsafe { attr.__bindgen_anon_2.key } as *const T {
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast
    |
    = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,
    = help: which means that Miri might miss pointer bugs in this program.
    = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.
    = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.
    = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.
    = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.
    = note: BACKTRACE on thread `maps::hash_map:`:
    = note: inside `maps::hash_map::hash_map::tests::bpf_key::<i32>` at aya/src/maps/hash_map/hash_map.rs:304:15: 304:63
```
  • Loading branch information
tamird committed May 3, 2024
1 parent 35962a4 commit cb6d3bd
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions aya/src/maps/hash_map/hash_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,6 @@ mod tests {
}

#[test]
// Syscall overrides are performing integer-to-pointer conversions, which
// should be done with `ptr::from_exposed_addr` in Rust nightly, but we have
// to support stable as well.
#[cfg_attr(miri, ignore)]
fn test_keys() {
let map = new_map(new_obj_map());

Expand All @@ -379,10 +375,6 @@ mod tests {
}

#[test]
// Syscall overrides are performing integer-to-pointer conversions, which
// should be done with `ptr::from_exposed_addr` in Rust nightly, but we have
// to support stable as well.
#[cfg_attr(miri, ignore)]
fn test_keys_error() {
let map = new_map(new_obj_map());
override_syscall(|call| match call {
Expand Down Expand Up @@ -416,10 +408,6 @@ mod tests {
}

#[test]
// Syscall overrides are performing integer-to-pointer conversions, which
// should be done with `ptr::from_exposed_addr` in Rust nightly, but we have
// to support stable as well.
#[cfg_attr(miri, ignore)]
fn test_iter() {
let map = new_map(new_obj_map());
override_syscall(|call| match call {
Expand All @@ -439,10 +427,6 @@ mod tests {
}

#[test]
// Syscall overrides are performing integer-to-pointer conversions, which
// should be done with `ptr::from_exposed_addr` in Rust nightly, but we have
// to support stable as well.
#[cfg_attr(miri, ignore)]
fn test_iter_key_deleted() {
let map = new_map(new_obj_map());
override_syscall(|call| match call {
Expand Down Expand Up @@ -473,10 +457,6 @@ mod tests {
}

#[test]
// Syscall overrides are performing integer-to-pointer conversions, which
// should be done with `ptr::from_exposed_addr` in Rust nightly, but we have
// to support stable as well.
#[cfg_attr(miri, ignore)]
fn test_iter_key_error() {
let map = new_map(new_obj_map());
override_syscall(|call| match call {
Expand Down Expand Up @@ -516,10 +496,6 @@ mod tests {
}

#[test]
// Syscall overrides are performing integer-to-pointer conversions, which
// should be done with `ptr::from_exposed_addr` in Rust nightly, but we have
// to support stable as well.
#[cfg_attr(miri, ignore)]
fn test_iter_value_error() {
let map = new_map(new_obj_map());
override_syscall(|call| match call {
Expand Down

0 comments on commit cb6d3bd

Please sign in to comment.