aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2021-08-24 13:20:18 +0000
committerEd Maste <emaste@FreeBSD.org>2021-08-24 13:58:10 +0000
commit37296464defda0aa769c39ab554deb4875aef000 (patch)
tree11a23e9c3d800255b194738ebbe41c5e88ae4030
parent9ce320820e6d760df11a88de11fbae024c18d23c (diff)
downloadsrc-37296464defda0aa769c39ab554deb4875aef000.tar.gz
src-37296464defda0aa769c39ab554deb4875aef000.zip
memcpy.3: remove BUGS section allowing overlapping strings
The removed text claimed that memcpy is implemented using bcopy and thus strings may overlap. Use of bcopy is an implementation detail that is no longer true, even if the implementation (on some archs) does allow overlap. In any case behaviour is undefined per the C standard if memcpy is called with overlapping objects, and this man page already claimed that src and dst may not overlap. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31192
-rw-r--r--lib/libc/string/memcpy.316
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/libc/string/memcpy.3 b/lib/libc/string/memcpy.3
index c65e4145264a..66a91592d90e 100644
--- a/lib/libc/string/memcpy.3
+++ b/lib/libc/string/memcpy.3
@@ -86,19 +86,3 @@ The
function
conforms to
.St -isoC .
-.Sh BUGS
-In this implementation
-.Fn memcpy
-and
-.Fn mempcpy
-are implemented using
-.Xr bcopy 3 ,
-and therefore the strings may overlap.
-On other systems, copying overlapping strings may produce surprises.
-Programs intended to be portable should use
-.Xr memmove 3
-when
-.Fa src
-and
-.Fa dst
-may overlap.