浏览代码

Remove miri ignores

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
```
Tamir Duberstein 11 月之前
父节点
当前提交
cb6d3bd75d
共有 1 个文件被更改,包括 0 次插入24 次删除
  1. 0 24
      aya/src/maps/hash_map/hash_map.rs

+ 0 - 24
aya/src/maps/hash_map/hash_map.rs

@@ -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());
 
@@ -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 {
@@ -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 {
@@ -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 {
@@ -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 {
@@ -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 {