git: 0e6bf38b578b - stable/13 - memcpy.3: remove BUGS section allowing overlapping strings

From: Ed Maste <>
Date: Sun, 24 Sep 2023 15:49:54 UTC
The branch stable/13 has been updated by emaste:


commit 0e6bf38b578b7b0a5bef0d8dbfb1fe6b1d9868f9
Author:     Ed Maste <>
AuthorDate: 2021-08-24 13:20:18 +0000
Commit:     Ed Maste <>
CommitDate: 2023-09-24 15:48:33 +0000

    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
    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:
    (cherry picked from commit 37296464defda0aa769c39ab554deb4875aef000)
 lib/libc/string/memcpy.3 | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/lib/libc/string/memcpy.3 b/lib/libc/string/memcpy.3
index c1aa2d4dd8f5..5ce43d5dfe75 100644
--- a/lib/libc/string/memcpy.3
+++ b/lib/libc/string/memcpy.3
@@ -85,19 +85,3 @@ The
 conforms to
 .St -isoC .
-In this implementation
-.Fn memcpy
-.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
-.Fa src
-.Fa dst
-may overlap.