We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b75e917 commit dbe0f1fCopy full SHA for dbe0f1f
tests/run-pass/malloc.rs
@@ -12,9 +12,8 @@ fn main() {
12
let saw_unaligned = (0..64).any(|_| unsafe {
13
let p = libc::malloc(3);
14
let addr = p as usize;
15
- let unaligned = addr % 4 != 0; // test that this is not 4-aligned
16
- libc::free(p); // FIXME have to free *after* test; should allow ptr-to-int of dangling ptr.
17
- unaligned
+ libc::free(p);
+ (p as usize) % 4 != 0 // find any that this is *not* 4-aligned
18
});
19
assert!(saw_unaligned);
20
0 commit comments