]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD: updates for FreeBSD 15 libsys
authorPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 23 Feb 2024 19:07:53 +0000 (20:07 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 23 Feb 2024 19:07:53 +0000 (20:07 +0100)
FreeBSD 15 has moved all libc functions that are just syscall
wrappers into libsys. That changes quite a few callstacks, so
I've added a load of filtering to make it look like the old
libc callstacks.

I'm also seeing new conflicts in _umtx_op_err for both DRD
and Helgrind that needed supressing.

freebsd-drd.supp
freebsd-helgrind.supp
memcheck/tests/freebsd/Makefile.am
memcheck/tests/freebsd/filter_fstat
memcheck/tests/freebsd/filter_getfsstat [new file with mode: 0755]
memcheck/tests/freebsd/filter_realpathat
memcheck/tests/freebsd/getfsstat.vgtest
tests/filter_libc

index 33f7e8ede2b63559b9f8853e56c0b1b7da02f1df..75303b2a74b682ecc3752a76b0e44621563449cf 100644 (file)
    obj:*/lib*/libc.so.7
    fun:getaddrinfo
 }
+{
+   DRD-FREEEBSD15-_UMTX_OP_ERR
+   drd:ConflictingAccess
+   fun:_umtx_op_err
+}
+
index 16e45c560ffad731e378174cde9aa485d40d5411..2b408fa40d1855d9ed4ce9be1d319e96d855e258 100644 (file)
    ...
    fun:getaddrinfo
 }
+{
+   FREEBSD15-LIB*-_UMTX_OP_ERR
+   Helgrind:Race
+   fun:_umtx_op_err
+}
+
index af8d0cacac52f1e7cd13fe038d9644416e33131f..bff8f618415e4476e17779ea3a0f8a04622a6ad8 100644 (file)
@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.tool-tests.am
 
 dist_noinst_SCRIPTS = filter_stderr filter_pts dump_stdout filter_sigwait \
        filter_scalar filter_realpathat filter_fstat filter_eventfd2 \
-       toucher1 toucher2
+       toucher1 toucher2 filter_getfsstat
 
 EXTRA_DIST = \
        access.vgtest \
index 65a5a1320524379dd1b71f900fec34e79ff82b6d..04b3629f6f507d4f9392a64e6ed53b156b2050fb 100755 (executable)
@@ -4,6 +4,10 @@
 
 gsed '/by 0x........: stat (in \/...libc...)/d;/by 0x........: fstat (in \/...libc...)/d;/by 0x........: fstatat (in \/...libc...)/d' |
 gsed '/by 0x........: statfs (in \/...libc...)/d;/by 0x........: fstatfs (in \/...libc...)/d' |
+gsed 's/at 0x........: fstatat (in \/...libc...)/.../' |
+gsed 's/: fstatfs/: __sys_fstatfs/' |
+gsed 's/: statfs/: _statfs/' |
+gsed 's/: fstat/: __sys_fstat/' |
 
 # fox x86 compatibility
 
diff --git a/memcheck/tests/freebsd/filter_getfsstat b/memcheck/tests/freebsd/filter_getfsstat
new file mode 100755 (executable)
index 0000000..7d01afd
--- /dev/null
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+../filter_stderr "$@" |
+
+gsed 's/: getfsstat/: _getfsstat/'
+
+exit 0
index 599a35cb389ad5e585e4a9f4d1426d04effdbec8..9628723fab2f2787c1eed015e2a6a94a2d79b593 100755 (executable)
@@ -2,6 +2,7 @@
 
 gsed 's/Invalid write of size 8/Invalid write of size 4/' |
 gsed 's/is [4-9][0-9] bytes inside a block of size 100 free/is ... bytes inside a block of size 100 free/' |
+gsed '/___realpathat/d' |
 
 
 ../filter_stderr "$@"
index 5e0fd31ac8ea3fffa8f856a763e5a9db83485e2a..81a5a7aa588ec35ec540fb83dc5a12ce859a93e0 100644 (file)
@@ -2,3 +2,4 @@ prereq: test -e ./getfsstat
 prog: getfsstat
 vgopts: -q --suppressions=getfsstat.supp
 stdout_filter: ./dump_stdout
+stderr_filter: ./filter_getfsstat
index 1bbf00757129111bd6530c17693e732722962537..160f1a4b4d9be15cc861b97bf0f4f9d948f4d770 100755 (executable)
@@ -11,7 +11,7 @@ while (<>)
     s/ __([a-z]*)_nocancel / $1 /;
 
     # "lib[S|s]ystem*" occurs on Darwin, "libsocket" on older Solaris/illumos.
-    s/\(in \/.*(libc|libSystem|libsystem|libsocket).*\)$/(in \/...libc...)/;
+    s/\(in \/.*(libc|libSystem|libsystem|libsocket|libsys).*\)$/(in \/...libc...)/;
     s/\(within \/.*(libc|libSystem|libsystem|libsocket).*\)$/(within \/...libc...)/;
 
     # Filter out dynamic loader