]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
2 weeks agogitignore: wildcard memcheck/tests/linux stderr diffs
Paul Floyd [Wed, 17 Sep 2025 10:39:33 +0000 (12:39 +0200)] 
gitignore: wildcard memcheck/tests/linux stderr diffs

Otherwise we may musl expected diff files in git status

2 weeks agoFreeBSD auxv: add new values for FreeBSD 15
Paul Floyd [Wed, 17 Sep 2025 06:33:48 +0000 (08:33 +0200)] 
FreeBSD auxv: add new values for FreeBSD 15

2 weeks agoFreeBSD regtest: updaus auxv test for new AT_* values added for FreeBSD 15
Paul Floyd [Wed, 17 Sep 2025 07:29:18 +0000 (09:29 +0200)] 
FreeBSD regtest: updaus auxv test for new AT_* values added for FreeBSD 15

They don't seem to be used on amd64 though.

2 weeks agoFreeBSD regtest: scalar inotify_add_watch_at for other platforms
Paul Floyd [Tue, 16 Sep 2025 19:40:41 +0000 (21:40 +0200)] 
FreeBSD regtest: scalar inotify_add_watch_at for other platforms

3 weeks agoFreeBSD regtest: correct scalar inotify_add_watch_at
Paul Floyd [Sun, 14 Sep 2025 10:03:28 +0000 (10:03 +0000)] 
FreeBSD regtest: correct scalar inotify_add_watch_at

The syscall has 4 args and I had only used 3 in scalar.c.

2 weeks agoBug 509517 - s390x: Add even/odd-lane memcheck test for VME etc.
Andreas Arnez [Wed, 10 Sep 2025 17:05:40 +0000 (19:05 +0200)] 
Bug 509517 - s390x: Add even/odd-lane memcheck test for VME etc.

Add an s390x-specific memcheck test case for the correct handling of
even/odd lanes with various vector insns.  The test fails before applying
the fix for Bug 509517 and succeeds afterwards.

2 weeks agoBug 509517 - s390x: Fix even/odd lane confusion for VME etc.
Andreas Arnez [Mon, 15 Sep 2025 13:39:11 +0000 (15:39 +0200)] 
Bug 509517 - s390x: Fix even/odd lane confusion for VME etc.

Fix the swapping of even/odd IROps generation in guest_s390_toIR.c for
VME, VMO, VMLE, VMLO, VMAE, VMAO, VMALE, and VMALO.  Adjust the code
generation for the according IROps to match the documentation in
libvex_ir.h.

2 weeks agoAdd bug 508145 to NEWS
Mark Wielaard [Mon, 15 Sep 2025 23:03:38 +0000 (01:03 +0200)] 
Add bug 508145 to NEWS

Fixed in commit 78fe3625f6b8
Add ppc64le linux hardwire for ld64.so.2 strcmp

3 weeks agobuild warning: silence a warning
Paul Floyd [Sun, 14 Sep 2025 15:36:26 +0000 (17:36 +0200)] 
build warning: silence a warning

and correct a comment referring to the wrong system header

3 weeks agos390: Improve guest_s390x_spechelper for S390_CC_OP_TEST_UNDER_MASK_16
Florian Krohm [Sat, 13 Sep 2025 21:05:15 +0000 (21:05 +0000)] 
s390: Improve guest_s390x_spechelper for S390_CC_OP_TEST_UNDER_MASK_16

Add missing cases. #fixs390 -= 1

3 weeks agoBug 380269 - [PATCH] No multithreading in macOS Sierra (10.12)
Paul Floyd [Sat, 13 Sep 2025 20:08:03 +0000 (22:08 +0200)] 
Bug 380269 - [PATCH] No multithreading in macOS Sierra (10.12)

The patches were mostly applied, and now everything is.

3 weeks agoFreeBSD x86 regtest: add an expected for memcheck timerfd test
Paul Floyd [Sat, 13 Sep 2025 21:57:24 +0000 (23:57 +0200)] 
FreeBSD x86 regtest: add an expected for memcheck timerfd test

Size differences in error messages. Hardly worth the bother
to filter.

3 weeks agoregtest: use filter for operator new/delete on 32bit systems
Paul Floyd [Sat, 13 Sep 2025 21:52:34 +0000 (23:52 +0200)] 
regtest: use filter for operator new/delete on 32bit systems

Size is unsigned long on 64 bit systems and unsigned int on
32 bit systems which shows up in the demangled names in the
callstacks.

3 weeks agoregtest: fix typo in Makefile.am
Paul Floyd [Sat, 13 Sep 2025 10:52:22 +0000 (12:52 +0200)] 
regtest: fix typo in Makefile.am

This was causing build failures on macOS 10.13

3 weeks agoDarwin syscall: fix build with fd checks
Paul Floyd [Sat, 13 Sep 2025 10:51:17 +0000 (12:51 +0200)] 
Darwin syscall: fix build with fd checks

Missed a couple of places where there is a fd variable used in macros and function calls.

3 weeks agoSuppresson name: keep 'BadSize' for backwards compatibility
Paul Floyd [Fri, 12 Sep 2025 19:56:14 +0000 (21:56 +0200)] 
Suppresson name: keep 'BadSize' for backwards compatibility

3 weeks agoNEWS: add description of changes to UnsafeZeroSize errors
Paul Floyd [Fri, 12 Sep 2025 19:46:04 +0000 (21:46 +0200)] 
NEWS: add description of changes to UnsafeZeroSize errors

3 weeks agodocs: add internals files to EXTRA_DIST
Paul Floyd [Fri, 12 Sep 2025 19:06:25 +0000 (21:06 +0200)] 
docs: add internals files to EXTRA_DIST

3 weeks agos390: Fix a confusing variable name.
Florian Krohm [Fri, 12 Sep 2025 14:40:36 +0000 (14:40 +0000)] 
s390: Fix a confusing variable name.

The mask is 8 bit wide here.

3 weeks agos390: Improve guest_s390x_spechelper for S390_CC_OP_TEST_UNDER_MASK_8
Florian Krohm [Fri, 12 Sep 2025 14:10:01 +0000 (14:10 +0000)] 
s390:  Improve guest_s390x_spechelper for S390_CC_OP_TEST_UNDER_MASK_8

Add missing cases. Tweak debug message.

3 weeks agoWrap the futex_waitv syscall
Martin Cermak [Fri, 12 Sep 2025 05:52:55 +0000 (07:52 +0200)] 
Wrap the futex_waitv syscall

Wrap the futex2/futex_waitv syscall:

sys_futex_waitv(struct futex_waitv __user *, waiters,
                unsigned int, nr_futexes, unsigned int, flags,
                struct __kernel_timespec __user *, timeout, clockid_t, clockid)

sys_futex_waitv - Wait on a list of futexes
@waiters:    List of futexes to wait on
@nr_futexes: Length of futexv
@flags:      Flag for timeout (monotonic/realtime)
@timeout:    Optional absolute timeout.
@clockid:    Clock to be used for the timeout, realtime or monotonic.

Given an array of `struct futex_waitv`, wait on each uaddr. The thread wakes
if a futex_wake() is performed at any uaddr. The syscall returns immediately
if any waiter has *uaddr != val. *timeout is an optional timeout value for
the operation. Each waiter has individual flags. The `flags` argument for
the syscall should be used solely for specifying the timeout as realtime, if
needed. Flags for private futexes, sizes, etc. should be used on the
individual flags of each waiter. Returns the array index of one of the woken
futexes. No further information is provided.

Declare a futex_waitv wrapper in priv_syswrap-linux.h
and hook it for {amd64,arm,arm64,mips64,ppc32,ppc64,riscv64,s390x\
,x86}- linux using LINX_ with PRE handler in syswrap-linux.c

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

3 weeks agoFreeBSD regtest: add a prereq test to none/tests/freebsd/proc_pid_file
Paul Floyd [Fri, 12 Sep 2025 07:49:02 +0000 (09:49 +0200)] 
FreeBSD regtest: add a prereq test to none/tests/freebsd/proc_pid_file

This test only passes if /proc has been mounted. Don't run
the test if there is no /proc.

3 weeks agoFreeBSD regtest scalar: clean up inotify_rm_watch messages
Paul Floyd [Fri, 12 Sep 2025 07:21:17 +0000 (09:21 +0200)] 
FreeBSD regtest scalar: clean up inotify_rm_watch messages

Had copied and pasted a 'sys_' prefix.

3 weeks agodoc: Add a HOWTO for building tcmalloc to test C23 functions
Paul Floyd [Thu, 11 Sep 2025 19:42:00 +0000 (21:42 +0200)] 
doc: Add a HOWTO for building tcmalloc to test C23 functions

3 weeks agoconfigure: add check for C++17 std::align_val_t
Paul Floyd [Thu, 11 Sep 2025 05:39:29 +0000 (07:39 +0200)] 
configure: add check for C++17 std::align_val_t

Again for older compilers that claim C++17 but lack some
features

3 weeks agoconfigure: forgot the makefile that uses HAVE_CONSTEXPR_IF
Paul Floyd [Thu, 11 Sep 2025 05:22:58 +0000 (07:22 +0200)] 
configure: forgot the makefile that uses HAVE_CONSTEXPR_IF

3 weeks agoconfigure: add check for C++ constexpr if
Paul Floyd [Thu, 11 Sep 2025 05:18:52 +0000 (07:18 +0200)] 
configure: add check for C++ constexpr if

For old compilers like GCC 6.3 that suppoert -std=c++17 but not
constexpr if, which is a 17 feature.

3 weeks agoir_opt.c: Fix algebraic simplification for division.
Florian Krohm [Wed, 10 Sep 2025 21:30:08 +0000 (21:30 +0000)] 
ir_opt.c: Fix algebraic simplification for division.

x / x ==> 1  IFF x is not 0. But that cannot be decided at
JIT time.

Remove mkOneOfPrimopResultType as it is no longer needed.

3 weeks agoHelgrind regtest: use older C++ dialect for bug392331.cpp
Paul Floyd [Wed, 10 Sep 2025 19:53:22 +0000 (21:53 +0200)] 
Helgrind regtest: use older C++ dialect for bug392331.cpp

Old versions of GCC (like 6.3) claim some C++17 support but
apparently not CTAD
https://en.cppreference.com/w/cpp/language/class_template_argument_deduction.html
So, go backwards and explicitly give the std::mutex template type for the locks.

3 weeks agoVEX: Minor non-functional change
Florian Krohm [Tue, 9 Sep 2025 21:51:33 +0000 (21:51 +0000)] 
VEX: Minor non-functional change

For the benefit of editors and for consistency:
The left brace of a function body goes to column #1.

3 weeks agoir_opt.c: Algebraic simplification for multiplication and division.
Florian Krohm [Tue, 9 Sep 2025 20:45:32 +0000 (20:45 +0000)] 
ir_opt.c: Algebraic simplification for multiplication and division.

New functions isOneU and mkOneOfPrimopResultType.
Adjust function mkZeroOfPrimopResultType.

3 weeks agoBug 388526 -Inconsistent severity in message text: "WARNING: Serious error"
Paul Floyd [Tue, 9 Sep 2025 19:05:37 +0000 (21:05 +0200)] 
Bug 388526 -Inconsistent severity in message text: "WARNING: Serious error"

3 weeks agoWrap the remap_file_pages syscall
Martin Cermak [Wed, 3 Sep 2025 14:02:26 +0000 (16:02 +0200)] 
Wrap the remap_file_pages syscall

The remap_file_pages() system call is used to create a nonlinear
mapping, that is, a mapping in which the pages of the file are
mapped into a nonsequential order in memory.  It is deprecated
but in some cases it may still be used.  LTP remap_file_pages01
and remap_file_pages02 test-cover it.

Declare a remap_file_pages wrapper in priv_syswrap-linux.h
and hook it for {amd64,arm,arm64,mips64,ppc32,ppc64,riscv64,s390x\
,x86}- linux using LINX_ with PRE handler in syswrap-linux.c

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

3 weeks agoBug 509258 - FreeBSD: add jail_attach_jd and jail_remove_jd syscall wrappers
Paul Floyd [Mon, 8 Sep 2025 05:31:02 +0000 (07:31 +0200)] 
Bug 509258 - FreeBSD: add jail_attach_jd and jail_remove_jd syscall wrappers

4 weeks agoBug 509139 - Update BadSize error messages
Paul Floyd [Sun, 7 Sep 2025 20:01:34 +0000 (22:01 +0200)] 
Bug 509139 - Update BadSize error messages

4 weeks agoaligned_alloc wrapper: musl seems to be the only one to accept an alignment of zero
Paul Floyd [Sun, 7 Sep 2025 07:50:33 +0000 (09:50 +0200)] 
aligned_alloc wrapper: musl seems to be the only one to accept an alignment of zero

4 weeks agoaligned_alloc wrapper: handle size and aligned values of 0
Paul Floyd [Sat, 6 Sep 2025 18:56:25 +0000 (20:56 +0200)] 
aligned_alloc wrapper: handle size and aligned values of 0

4 weeks agoSolaris 11: fix for VG_(lstat)
Paul Floyd [Sat, 6 Sep 2025 14:49:10 +0000 (16:49 +0200)] 
Solaris 11: fix for VG_(lstat)

This function was using SYS_lstat. It works OK with illumos
but not Solaris 11+ which has removed that syscall.

Instead do like Linux and FreeBSD, use SYS_fstatat with the flag
for no follow link.

4 weeks agoFreeBSD memalign wrapper: size of 0 now allowed
Paul Floyd [Sat, 6 Sep 2025 11:52:47 +0000 (13:52 +0200)] 
FreeBSD memalign wrapper: size of 0 now allowed

memalign, the random allocator function amongst allocators

4 weeks agoposix_memalign wrapper - remove newline from malloc trace
Paul Floyd [Sat, 6 Sep 2025 07:16:17 +0000 (09:16 +0200)] 
posix_memalign wrapper - remove newline from malloc trace

4 weeks agoFreeBSD regtest: arm64 scalar
Paul Floyd [Fri, 5 Sep 2025 10:57:44 +0000 (12:57 +0200)] 
FreeBSD regtest: arm64 scalar

Right number of underscores in freebsd7 compat syscall fakes

4 weeks agoFreeBSD regtest and syscall message
Paul Floyd [Fri, 5 Sep 2025 07:15:36 +0000 (09:15 +0200)] 
FreeBSD regtest and syscall message

4 weeks agoFreeBSD regtest: update fake freebsd7 output for amrm64
Paul Floyd [Fri, 5 Sep 2025 07:15:36 +0000 (09:15 +0200)] 
FreeBSD regtest: update fake freebsd7 output for amrm64

First attempt

4 weeks agoBug 509107 - memcheck/tests/duplicate_align_size_errors.cpp fails
Paul Floyd [Fri, 5 Sep 2025 07:04:16 +0000 (09:04 +0200)] 
Bug 509107 - memcheck/tests/duplicate_align_size_errors.cpp fails

4 weeks agoFreeBSD syscall: add ML_(fd_allowed) check for fstat
Paul Floyd [Fri, 5 Sep 2025 06:21:32 +0000 (08:21 +0200)] 
FreeBSD syscall: add ML_(fd_allowed) check for fstat

Also PRE(sys_cap_rights_get) was checking the wrong arg
with ML_(fd_allowed). ARG1 is a version number in the
syscall, ARG2 is the fd.

4 weeks agoSolaris syscall: add ML_(fd_allowed) check for fstat
Paul Floyd [Fri, 5 Sep 2025 06:11:15 +0000 (08:11 +0200)] 
Solaris syscall: add ML_(fd_allowed) check for fstat

4 weeks agoFreeBSD regtest: clean up compat syscall messages
Paul Floyd [Thu, 4 Sep 2025 19:17:43 +0000 (21:17 +0200)] 
FreeBSD regtest: clean up compat syscall messages

Old syscalls never die. They just become freebsdXX_syscall.
And I forget to rename all their arguments.

4 weeks agoFix compilation of tests/arm64/bug484935.c when using fat LTO.
Romain Geissler [Thu, 4 Sep 2025 12:10:12 +0000 (12:10 +0000)] 
Fix compilation of tests/arm64/bug484935.c when using fat LTO.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121719

Fix this error:
/tmp/ccfnh7KQ.s: Assembler messages:
/tmp/ccfnh7KQ.s:175: Error: symbol `loop' is already defined

4 weeks agoir_opt.c: Fix mkZeroOfPrimopResultType
Florian Krohm [Thu, 4 Sep 2025 13:01:52 +0000 (13:01 +0000)] 
ir_opt.c:  Fix mkZeroOfPrimopResultType

In c93dba5adbd5d I forgot to adjust mkZeroOfPrimopResultType.

This function needs to go. See also 7270e04ab8eb7.

I should be able to query IROp properties easily and for all IRops.
E.g. instead of calling mkZeroOfPrimopResultType I want this:

mkZero(irop->result_type)

4 weeks agoAdd fd_allowed check to fstat (sys_newfstat)
Mark Wielaard [Wed, 3 Sep 2025 17:20:24 +0000 (19:20 +0200)] 
Add fd_allowed check to fstat (sys_newfstat)

Makes sure that with --track-fds fstat is also checked.

4 weeks agoRemove fdleak.h CLOSE_INHERITED_FDS workaround
Mark Wielaard [Wed, 3 Sep 2025 16:29:43 +0000 (18:29 +0200)] 
Remove fdleak.h CLOSE_INHERITED_FDS workaround

This workaround was necessary with very old perl implementations (from
2008) which might execute programs with some non-standard file
descriptors not closed. The macro would close all file descriptors 3
or higher so --track-fds wouldn't report on them.

More recently --track-fds also reports on bad file descriptor
usage. First only double or bad close calls were reported. This would
cause lots of warnings for the close_inherited file descriptor loop
because almost all of those file descriptors were never opened, so
--track-fds would report those. To work around that an fstat call was
added before the close to make sure the file descriptor existed.

This fstat workaround in close_inherited only worked because fstat
didn't have a fd_allowed check. Which is a bug that should be
fixed. On some systems fstat actually calls the fstatat syscall and
that did recently got the fd_allowed check, so on systems that use
fstatat for fstat various fdleak tests started failing.

We could test for and use close_range, which is smart enough to not
warn about never opened file descriptors in the range. But it seems
simpler to just get rid of the CLOSE_INHERITED_FDS macro because the
problematic perl implementation is now so old that nobody uses it
anymore.

4 weeks agoir_opt.c: Algebraic simplification for Iop_Or1.
Florian Krohm [Wed, 3 Sep 2025 15:09:50 +0000 (15:09 +0000)] 
ir_opt.c:  Algebraic simplification for Iop_Or1.

Adapt function mkOnesOfPrimopResultType accordingly.

4 weeks agoir_opt.c: Algebraic simplification for Iop_Shl/Shr/Sar.
Florian Krohm [Wed, 3 Sep 2025 15:07:52 +0000 (15:07 +0000)] 
ir_opt.c:  Algebraic simplification for Iop_Shl/Shr/Sar.

The simplification rules for 32-bit and 64-bit operands also apply for
8-bit and 16-bit operands.

4 weeks agoir_opt.c: Algebraic simplification for Iop_Sub.
Florian Krohm [Wed, 3 Sep 2025 15:03:08 +0000 (15:03 +0000)] 
ir_opt.c:  Algebraic simplification for Iop_Sub.

The simplification rules for IopSub32/64 also apply for Iop_Sub8/16.

4 weeks agoir_opt.c: Algebraic simplification for Iop_Add.
Florian Krohm [Wed, 3 Sep 2025 15:00:56 +0000 (15:00 +0000)] 
ir_opt.c:  Algebraic simplification for Iop_Add.

The simplification rules for IopAdd32/64 also apply for Iop_Add8/16.

4 weeks agoVEX: Fix function mkOnesOfPrimopResultType
Florian Krohm [Wed, 3 Sep 2025 14:48:39 +0000 (14:48 +0000)] 
VEX: Fix function mkOnesOfPrimopResultType

This function may be called with Iop_Max32U as argument which isn't
handled.

4 weeks agoVEX: Remove functions isZeroU32 and isZeroU64
Florian Krohm [Wed, 3 Sep 2025 14:38:41 +0000 (14:38 +0000)] 
VEX: Remove functions isZeroU32 and isZeroU64

This was forgotten when function isZeroU was added.

5 weeks agoFreeBSD suppression: add a DRD suppression for exterrctl
Paul Floyd [Sun, 31 Aug 2025 16:34:11 +0000 (18:34 +0200)] 
FreeBSD suppression: add a DRD suppression for exterrctl

5 weeks agoFreeBSD syscalls: new getgroups and setgroups
Paul Floyd [Sun, 31 Aug 2025 14:40:30 +0000 (16:40 +0200)] 
FreeBSD syscalls: new getgroups and setgroups

Wasn't quite right for FreeBSD 15.

5 weeks agoBug 508958 - FreeBSD: add getgroups and setgroups wrappers
Paul Floyd [Sun, 31 Aug 2025 14:32:20 +0000 (16:32 +0200)] 
Bug 508958 - FreeBSD: add getgroups and setgroups wrappers

5 weeks agoBug 507867 - perf_event_open group_fd isn't checked
Paul Floyd [Sun, 31 Aug 2025 08:44:49 +0000 (10:44 +0200)] 
Bug 507867 - perf_event_open group_fd isn't checked

5 weeks agoBug 507866 - fanotify_mark dirfd isn't checked
Paul Floyd [Sun, 31 Aug 2025 06:21:23 +0000 (08:21 +0200)] 
Bug 507866 - fanotify_mark dirfd isn't checked

5 weeks agoillumos syscalls: refactor *at directory fd checks
Paul Floyd [Sun, 31 Aug 2025 06:02:00 +0000 (08:02 +0200)] 
illumos syscalls: refactor *at directory fd checks

Mainly to reduyce the amount of copied and pasted code.
Slight improvements to messages to syscalls that have two
directory fds.

5 weeks agoFreeBSD realpathat syscall: fix length of written memory and add a testcase
Paul Floyd [Sat, 30 Aug 2025 20:05:12 +0000 (22:05 +0200)] 
FreeBSD realpathat syscall: fix length of written memory and add a testcase

There were no tests for /proc/currrproc/file
and the length written in post was out by one

5 weeks agolibvex_ir.h: Clarify semantics of division and modulo operation.
Florian Krohm [Sat, 30 Aug 2025 13:39:04 +0000 (13:39 +0000)] 
libvex_ir.h: Clarify semantics of division and modulo operation.

5 weeks agoiropt-test: Constant folding for DivModU32to32 and DivModS32to32
Florian Krohm [Sat, 30 Aug 2025 11:28:03 +0000 (11:28 +0000)] 
iropt-test: Constant folding for DivModU32to32 and DivModS32to32

Needed for Mips. Mips is still disabled in iropt-test because there
are miscompares between the folded the result and the result computed
by the insn sequence that implements the IROp. Several IRops are affected.

Part of fixing https://bugs.kde.org/show_bug.cgi?id=506211

5 weeks agoiropt-test: Prepare IROp table for mips.
Florian Krohm [Fri, 29 Aug 2025 21:28:05 +0000 (21:28 +0000)] 
iropt-test: Prepare IROp table for mips.

Part of fixing https://bugs.kde.org/show_bug.cgi?id=506211

5 weeks agoBug 508779 - PRE(sys_prlimit64): reorder check for memory validity
Matthias Schwarzott [Sat, 23 Aug 2025 11:37:46 +0000 (13:37 +0200)] 
Bug 508779 - PRE(sys_prlimit64): reorder check for memory validity

so all errors are displayed and not just the first

5 weeks agoBug 508778 - syscall-wrapper waitid warns about infop=null
Matthias Schwarzott [Sat, 23 Aug 2025 11:37:46 +0000 (13:37 +0200)] 
Bug 508778 - syscall-wrapper waitid warns about infop=null

This is used by e.g. Qt:
https://github.com/qt/qtbase/blob/e17798560b107b7abd5f2cf472d942e8ac4213ff/src/3rdparty/forkfd/forkfd_linux.c#L128

5 weeks agoBug 508777 - amd64-linux: add minimal scalar test
Matthias Schwarzott [Sat, 23 Aug 2025 11:37:46 +0000 (13:37 +0200)] 
Bug 508777 - amd64-linux: add minimal scalar test

5 weeks agoBug 508869 - x86-linux: simplify scalar test output
Matthias Schwarzott [Thu, 28 Aug 2025 20:30:25 +0000 (22:30 +0200)] 
Bug 508869 - x86-linux: simplify scalar test output

5 weeks agoregtest: add vgtest and expected for memcheck duplicate_align_size_errors
Paul Floyd [Fri, 29 Aug 2025 06:22:17 +0000 (08:22 +0200)] 
regtest: add vgtest and expected for memcheck duplicate_align_size_errors

The cpp file and .gitignore change were done at the same
time as the aligned size checks, but I missed out the expected
vgtest and Makefile.am changes. There were also a couple of unused
variables in the cpp file.

5 weeks agoFreeBSD: fix build error
Paul Floyd [Fri, 29 Aug 2025 06:22:17 +0000 (08:22 +0200)] 
FreeBSD: fix build error

Deleteted wrong variable when doing *at() syscall refactoring.

5 weeks agoLinux FreeBSD and Darwin: refactor *at syscall dirfd checks
Paul Floyd [Fri, 29 Aug 2025 05:59:28 +0000 (07:59 +0200)] 
Linux FreeBSD and Darwin: refactor *at syscall dirfd checks

I haven't done Solaris. The code there is less messy because
Solaris doesn't use a negative value for AT_FDCWD, meaning
no explicit or implicit cast from unsigned word to signed
int is needed before comparing to the int dirfd parameter.

5 weeks agoiropt-test: Constant folding for Iop_DivModU64to32 and Iop_DivModS64to32
Florian Krohm [Thu, 28 Aug 2025 20:17:29 +0000 (20:17 +0000)] 
iropt-test: Constant folding for Iop_DivModU64to32 and Iop_DivModS64to32

Function get_selected_values has been tweaked to return more
"interesting" values for test generation. Namely those that,
when interpreted as a signed integer, are boundary (or near
boundary) values.

Also a bit of reorg because for the DivMod.. IROps we need to be a bit
more careful when generating testcases that do not trap or where the
result does not fit in 32 bit.

Part of fixing https://bugs.kde.org/show_bug.cgi?id=506211

5 weeks agoBug 507869 - Various at syscalls don't check dirfd argument
Paul Floyd [Thu, 28 Aug 2025 19:33:43 +0000 (21:33 +0200)] 
Bug 507869 - Various at syscalls don't check dirfd argument

5 weeks agoiropt-test: Enable for x86 and amd64.
Florian Krohm [Tue, 26 Aug 2025 21:02:09 +0000 (21:02 +0000)] 
iropt-test: Enable for x86 and amd64.

5 weeks agoFix Iop_ClzNat32/64 and Iop_CtzNat32/64 on x86 and amd64.
Florian Krohm [Tue, 26 Aug 2025 20:52:26 +0000 (20:52 +0000)] 
Fix Iop_ClzNat32/64 and Iop_CtzNat32/64 on x86 and amd64.

Handle the special case of 0 operand.

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

5 weeks agoTypo in comment.
Paul Floyd [Tue, 26 Aug 2025 20:11:50 +0000 (22:11 +0200)] 
Typo in comment.

I did correct it, but didn't save before pushing.

5 weeks agoLinux syscalls: add checks for remaining *at() directory fd args
Paul Floyd [Tue, 26 Aug 2025 19:56:55 +0000 (21:56 +0200)] 
Linux syscalls: add checks for remaining *at() directory fd args

5 weeks agoBug 508638 - Self-hosting not working on FreeBSD
Paul Floyd [Tue, 26 Aug 2025 11:32:07 +0000 (13:32 +0200)] 
Bug 508638 - Self-hosting not working on FreeBSD

5 weeks agoLinux syscall: copy and paste error in openat2 fd_allowed check
Paul Floyd [Tue, 26 Aug 2025 11:13:49 +0000 (13:13 +0200)] 
Linux syscall: copy and paste error in openat2 fd_allowed check

5 weeks agoFreeBSD 64bit: client stack changes
Paul Floyd [Tue, 26 Aug 2025 06:42:56 +0000 (08:42 +0200)] 
FreeBSD 64bit: client stack changes

Just use system max stack size, but with a lower limit of 64Mb
Add some -d -d traces

5 weeks agoFreeBSD regtest: turn off uninitilised warnings for readlinkat test
Paul Floyd [Tue, 26 Aug 2025 05:38:32 +0000 (07:38 +0200)] 
FreeBSD regtest: turn off uninitilised warnings for readlinkat test

5 weeks agoFreeBSD: fix guest stack creation for self-hosting
Paul Floyd [Mon, 25 Aug 2025 19:48:53 +0000 (21:48 +0200)] 
FreeBSD: fix guest stack creation for self-hosting

See https://bugs.kde.org/show_bug.cgi?id=508638
Not fully resolved, making progress.

6 weeks agoRemove deprecated IROps Iop_Clz32, Iop_Clz64, Iop_Ctz32, and Iop_Ctz64
Florian Krohm [Sun, 24 Aug 2025 20:46:25 +0000 (20:46 +0000)] 
Remove deprecated IROps Iop_Clz32, Iop_Clz64, Iop_Ctz32, and Iop_Ctz64

Part of fixing https://bugs.kde.org/show_bug.cgi?id=507033

6 weeks agoPPC specific changes for BC 507033
Florian Krohm [Sun, 24 Aug 2025 20:26:58 +0000 (20:26 +0000)] 
PPC specific changes for BC 507033

Replace the deprecated Iop_Clz64 with Iop_ClzNat64. This is safe to
do because insn selection does not distinguish between Iop_Clz64 and
Iop_ClzNat64:

Iop_Clz64 / Iop_ClzNat64 --isel--> Pun_CLZ64 --emit-->cntlzd

The cntlzd insn has "natural" semantics and a 0 operand is not special.

Part of fixing https://bugs.kde.org/show_bug.cgi?id=507033

6 weeks agoAdd 507720 to NEWS
Paul Floyd [Sun, 24 Aug 2025 19:36:35 +0000 (21:36 +0200)] 
Add 507720 to NEWS

6 weeks agoDarwin regtest: turn off ada mangling test
Paul Floyd [Sun, 24 Aug 2025 16:34:04 +0000 (18:34 +0200)] 
Darwin regtest: turn off ada mangling test

On Darwin clang adds an underscore to mangle C functions
which interferes with this testcase which tries to fake ada
mangling in C.

6 weeks agoDarwin: fix a warning, unused local
Paul Floyd [Sun, 24 Aug 2025 14:20:18 +0000 (16:20 +0200)] 
Darwin: fix a warning, unused local

6 weeks agoDarwin syscalls: fd handling (part 4)
Paul Floyd [Sun, 24 Aug 2025 14:16:24 +0000 (16:16 +0200)] 
Darwin syscalls: fd handling (part 4)

Most already done.

6 weeks agoDarwin: add VG_(resolved_exename)
Paul Floyd [Sun, 24 Aug 2025 14:11:25 +0000 (16:11 +0200)] 
Darwin: add VG_(resolved_exename)

Possibly not needed. On Linux it's used to check that the guest exe
doen't get opend with a write flag. macOS seems happy to allow that.

6 weeks agoillumos syscalls: fd handling (part 4)
Paul Floyd [Sun, 24 Aug 2025 09:25:51 +0000 (11:25 +0200)] 
illumos syscalls: fd handling (part 4)

Almost everything looked OK. Added a couple of POST_newFd_RES
macro uses.

There are a few functions that create fds other than via RES
(like pipe). For these I think that we need to add a
POST_newFd(fd) macro, plus in a few places refactor so that
RES is available to set the status after ML_(get_next_new_fd).

6 weeks agoFreeBSD regtest: pdfork_pdfill last fix (hopefully)
Paul Floyd [Sat, 23 Aug 2025 19:58:25 +0000 (21:58 +0200)] 
FreeBSD regtest: pdfork_pdfill last fix (hopefully)

Now passes on amd64 arm64 and x86

6 weeks agoFreeBSD regtest: updates to scalar for x86
Paul Floyd [Sat, 23 Aug 2025 22:05:51 +0000 (00:05 +0200)] 
FreeBSD regtest: updates to scalar for x86

Now that there better checks of fds a couple of syscalls using
rubbish values for fd which were above the max files limit.
That changed the syscall return code causing an assert.

Also some left over updates to the expected from previous changes.

6 weeks agoFreeBSD regtest: pdfork_pdkill again
Paul Floyd [Sat, 23 Aug 2025 21:54:16 +0000 (23:54 +0200)] 
FreeBSD regtest: pdfork_pdkill again

x86 needs some filtering, and I think arm64 will need an expected

6 weeks agoFreeeBSD regtest: add the suppression for pdfork_pdkill
Paul Floyd [Sat, 23 Aug 2025 19:35:48 +0000 (21:35 +0200)] 
FreeeBSD regtest: add the suppression for pdfork_pdkill

6 weeks agoFreeBSD regtest: get pdfork_pdkill to pass on arm64
Paul Floyd [Sat, 23 Aug 2025 19:31:13 +0000 (21:31 +0200)] 
FreeBSD regtest: get pdfork_pdkill to pass on arm64

arm64 was giving a few conditional jump errors (suppressed)
and a pdfork was succeeding with uninit flags whilst it was
failing on amd64. Made sure that it has bad flags (-1) but
still uninit.

6 weeks agoFreeBSD regtest: cleanup fd handling
Paul Floyd [Sat, 23 Aug 2025 15:55:27 +0000 (17:55 +0200)] 
FreeBSD regtest: cleanup fd handling

Build error on arm64 and update scalar expected.
scalar not looking right for x86

6 weeks agoFreeBSD syscalls: fd handling (part 3)
Paul Floyd [Sat, 23 Aug 2025 13:42:47 +0000 (15:42 +0200)] 
FreeBSD syscalls: fd handling (part 3)

arm64 file