remove the memcpy-on-equal-ptrs assumption
This commit is contained in:
parent
42ae1a7615
commit
73042206dd
@ -24,9 +24,8 @@
|
||||
//! which are generated by Rust codegen backends. Additionally, this library can make explicit
|
||||
//! calls to `strlen`. Their signatures are the same as found in C, but there are extra
|
||||
//! assumptions about their semantics: For `memcpy`, `memmove`, `memset`, `memcmp`, and `bcmp`, if
|
||||
//! the `n` parameter is 0, the function is assumed to not be UB. Furthermore, for `memcpy`, if
|
||||
//! source and target pointer are equal, the function is assumed to not be UB.
|
||||
//! (Note that these are standard assumptions among compilers:
|
||||
//! the `n` parameter is 0, the function is assumed to not be UB, even if the pointers are NULL or
|
||||
//! dangling. (Note that making extra assumptions about these functions is common among compilers:
|
||||
//! [clang](https://reviews.llvm.org/D86993) and [GCC](https://gcc.gnu.org/onlinedocs/gcc/Standards.html#C-Language) do the same.)
|
||||
//! These functions are often provided by the system libc, but can also be provided by the
|
||||
//! [compiler-builtins crate](https://crates.io/crates/compiler_builtins).
|
||||
|
Loading…
Reference in New Issue
Block a user