Bug 476780

Summary: Extend strlcat and strlcpy wrappers to GNU libc
Product: [Developer tools] valgrind Reporter: Paul Floyd <pjfloyd>
Component: memcheckAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 3.22 GIT   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Paul Floyd 2023-11-10 09:15:59 UTC
GNU libc 2.38 now has strlcat and strlcpy wrappers

See

https://news.ycombinator.com/item?id=36765747

and

https://sourceware.org/git/?p=glibc.git;a=commit;h=454a20c8756c9c1d55419153255fc7692b3d2199

(they are also present in musl see
https://elixir.bootlin.com/musl/latest/source/src/string/strlcat.c
and
https://elixir.bootlin.com/musl/latest/source/src/string/strlcpy.c#L11)

The only tests that we have at the moment in memcheck are for strlcpy on Solaris.
Comment 1 Paul Floyd 2023-11-12 21:12:47 UTC
commit e25c5e40d54c4ba7a2a74e2f3ce3048d7ed70053 (HEAD -> master, origin/master, origin/HEAD)
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date:   Sun Nov 12 22:11:52 2023 +0100

    Bug 476780 - Extend strlcat and strlcpy wrappers to GNU libc (part 2)
    
    Linux regtest

commit d154591f595cf052bdc0aa9820c44365a46c6864
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date:   Sun Nov 12 18:07:52 2023 +0100

    Bug 476780 - Extend strlcat and strlcpy wrappers to GNU libc
    
    Will add Linux regtest soon