Skip to content

Commit

Permalink
Fix UB in destroy_array test
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Oct 9, 2020
1 parent e08b21c commit b363b3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crossbeam-epoch/src/collector.rs
Expand Up @@ -383,7 +383,7 @@ mod tests {
let ptr = v.as_mut_ptr() as usize;
let len = v.len();
guard.defer_unchecked(move || {
drop(Vec::from_raw_parts(ptr as *const u8 as *mut u8, len, len));
drop(Vec::from_raw_parts(ptr as *const i32 as *mut i32, len, len));
DESTROYS.fetch_add(len, Ordering::Relaxed);
});
guard.flush();
Expand Down

0 comments on commit b363b3d

Please sign in to comment.