We somewhat recently declared copy_nonoverlapping to be legal on a NULL pointer. However, the debug assertions still reject this:
|
ub_checks::is_aligned_and_not_null(src, align) |
|
&& ub_checks::is_aligned_and_not_null(dst, align) |
|
&& ub_checks::is_nonoverlapping(src, dst, size, count) |
Other, related functions have similar problems.
Cc @saethlin
We somewhat recently declared
copy_nonoverlappingto be legal on a NULL pointer. However, the debug assertions still reject this:rust/library/core/src/intrinsics.rs
Lines 3315 to 3317 in 7caad69
Other, related functions have similar problems.
Cc @saethlin