https://bugs.kde.org/show_bug.cgi?id=528740

            Bug ID: 528740
           Summary: Reset of FreeBSD syscall regtest filters
    Classification: Developer tools
           Product: valgrind
      Version First unspecified
       Reported In:
          Platform: Other
                OS: FreeBSD
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

The FreeBSD syscall regtest filters are a big mess. Two major changes have
affected syscalls in callstacks.

1. In 2024 libsys split from libc. That changed filenames and also an
underscore was added before syscall names.
2. Bug 528630 meant that we were not reading split debuginfo before FreeBSD 15

In addition to the above two items the system being used for testing may or may
not have the core debug packages installed.

As a few examples

FreeBSD 15 arm64 with the 528630 fix
==97283== Syscall param sigwait(sig) points to unaddressable byte(s)
==97283==    at 0x4D3B01C: _sigwait (_openat.S:4)
==97283==    by 0x4D38E4B: __sigwait (src/lib/libsys/libsys_sigwait.c:42)
==97283==    by 0x2109F7: main (sigwait.c:72)
==97283==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

FreeBSD 15 arm64 without the 528630 fix
==97309== Syscall param sigwait(sig) points to unaddressable byte(s)
==97309==    at 0x4D3B01C: _sigwait (in /lib/libsys.so.7)
==97309==    by 0x4D38E4B: __sigwait (in /lib/libsys.so.7)
==97309==    by 0x2109F7: main (sigwait.c:72)
==97309==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

FreeBSD 14 amd64 with the 528630 fix
==42915== Syscall param sigwait(sig) points to unaddressable byte(s)
==42915==    at 0x4998B3A: _sigwait (_sigwait.S:4)
==42915==    by 0x49955EA: __sigwait (src/lib/libc/sys/sigwait.c:50)
==42915==    by 0x201B76: main (sigwait.c:72)
==42915==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

FreeBSD 14 amd64 without the 528630 fix
==42925== Syscall param sigwait(sig) points to unaddressable byte(s)
==42925==    at 0x4998B3A: _sigwait (in /lib/libc.so.7)
==42925==    by 0x49955EA: __sigwait (in /lib/libc.so.7)
==42925==    by 0x201B76: main (sigwait.c:72)
==42925==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

It's the last one that the expected most resembles
Syscall param sigwait(sig) points to unaddressable byte(s)
   at 0x........: _sigwait (in /...libc...)
   by 0x........: __sigwait (in /...libc...)
   by 0x........: main (sigwait.c:72)
 Address 0x........ is not stack'd, malloc'd or (recently) free'd

Most of this can be handled by a couple of transformations
libsys -> libc
syscall (syscall.S:4) -> syscall (in /...libc...) where 'syscall' is a real
syscall name like 'getrandom'

There are a few exceptions to these rules.
On arm64 the syscall stub files seem to be __mac_get_file.S:4
That's strange, maybe a bug in the build system?
Also syscalls like _openat don't follow this pattern.

As a consequence the fdleak filters in none/tests and the fstat filters in
memcheck/tests/freebsd are a big mess.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to