]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
2 days agogetdents* syswrap: only check proc fd/fdinfo on Linux and Solaris master
Paul Floyd [Fri, 3 Oct 2025 18:54:15 +0000 (20:54 +0200)] 
getdents* syswrap: only check proc fd/fdinfo on Linux and Solaris

Keep check for __NR_getdents and use a check for __NR_getdents64

2 days agoAdd BZ 495483 to NEWS.
Florian Krohm [Fri, 3 Oct 2025 16:31:59 +0000 (16:31 +0000)] 
Add BZ 495483 to NEWS.

Darn I keep forgetting this....

2 days agoControl building documentation (BZ 495483)
Florian Krohm [Fri, 3 Oct 2025 16:26:55 +0000 (16:26 +0000)] 
Control building documentation   (BZ 495483)

Introduce Makefile variable BUILD_DOCS with these possible values:
none - does not build any documentation
all  - builds all documentation
html - builds HTML docs but skips building PDFs

BUILD_ALL_DOCS is still recognised for backward compatibility and
is mapped to BUILD_DOCS like so:
If not specified   --> BUILD_DOCS=all
BUILD_ALL_DOCS=yes --> BUILD_DOCS=all
BUILD_ALL_DOCS=no  --> BUILD_DOCS=html

README_DEVELOPERS adjusted.

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

3 days agogetdents_filter.vgtest: Add filter_sort
Alexandra Hájková [Tue, 30 Sep 2025 13:54:58 +0000 (09:54 -0400)] 
getdents_filter.vgtest: Add filter_sort

On some file systems the testfiles 1000 and 1001 come out in different
order. Add filter_sort to sort the output lines to always appear at the
same order.

3 days agoFreeBSD: fix build, FreeBSD has no dirent64 or getdent64
Paul Floyd [Thu, 2 Oct 2025 05:46:59 +0000 (07:46 +0200)] 
FreeBSD: fix build, FreeBSD has no dirent64 or getdent64

Need to check Darwin as well.

4 days agonone/tests/Makefile.am: Add s390x/disasm-test to DIST_SUBDIRS
Mark Wielaard [Wed, 1 Oct 2025 14:42:17 +0000 (16:42 +0200)] 
none/tests/Makefile.am: Add s390x/disasm-test to DIST_SUBDIRS

Fixes: 6abf08f96a97 ("disasm-test: Makefile tweaks")
4 days agoAdd BZ 506211 to NEWS
Florian Krohm [Wed, 1 Oct 2025 14:42:23 +0000 (14:42 +0000)] 
Add BZ 506211 to NEWS

4 days agodisasm-test: Makefile tweaks
Florian Krohm [Wed, 1 Oct 2025 12:48:12 +0000 (12:48 +0000)] 
disasm-test: Makefile tweaks

disasm-test/Makefile.am: Include Makefile.tool-tests.am not Makefile.all.am

Also: do not build disasm-test on platforms other than s390x. There is no
point doing so as you won't be able to run it in a meaningful way.

4 days agoVEX: Remove algebraic simplification for shift IROps.
Florian Krohm [Wed, 1 Oct 2025 12:19:13 +0000 (12:19 +0000)] 
VEX: Remove algebraic simplification for shift IROps.

Shl/Shr/Sar(0,x) ==> 0

Don't. Because doing so removes the undefined behaviour in case the shift
amount is out of range.  This is also consistent with what constant folding
does in this case, namely, passing the undefined behaviour down the VEX
pipeline.

4 days agoAdd BZ 509157 to NEWS.
Florian Krohm [Tue, 30 Sep 2025 20:27:43 +0000 (20:27 +0000)] 
Add BZ 509157 to NEWS.

4 days agoriscv64: Fix IR generation for shift operations (BZ 509157)
Florian Krohm [Tue, 30 Sep 2025 20:14:24 +0000 (20:14 +0000)] 
riscv64: Fix IR generation for shift operations  (BZ 509157)

For SLL, SRL, and SRA the shift amount is 6 bits wide - not 8 bits.
For SLLW, SRLW, and SRAW the shift amount is 5 bits wide - not 8 bits.

Patch for IR generation by Christoph Jung (christoph.j27@googlemail.com).

Also clarify semantics of bitwise shift operators in libvex_ir.h

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

5 days agos390: Cleanup none/tests/s390x/Makefile.am
Florian Krohm [Mon, 29 Sep 2025 22:35:10 +0000 (22:35 +0000)] 
s390: Cleanup none/tests/s390x/Makefile.am

5 days agos390: Add testcases for unhandled IEEE exceptions. Fixes BZ 306098
Florian Krohm [Mon, 29 Sep 2025 21:34:56 +0000 (21:34 +0000)] 
s390: Add testcases for unhandled IEEE exceptions. Fixes BZ 306098

New emulation warnings: EmWarn_S390X_XxC_not_zero and EmWarn_S390X_XiC_not_zero
New testcases bfp-XxC, dfp-XxC, and dfp-XiC.
New testcase driver emwarn-gen.pl to get around valgrind's restriction
on the number of emulation warnings.

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

6 days agos390x: Fix inline assembly for STFLE
Andreas Arnez [Mon, 29 Sep 2025 14:11:04 +0000 (16:11 +0200)] 
s390x: Fix inline assembly for STFLE

The inline assembly for emitting the STFLE instruction changes GPR 0, but
fails to mention it in the clobber list.  Depending on the compiler's
mood, this may result in wrong code.

A simple fix would be to just add "0" to the clobber list, but for
readability it also helps to move the inline assembly to a separate
function.  So do that.  In that function, use an "asm" variable for GPR 0
instead of moving the value back and forth between registers.

7 days agoAdd BZ 309100
Florian Krohm [Sun, 28 Sep 2025 13:17:28 +0000 (13:17 +0000)] 
Add BZ 309100

8 days agoFix file permissions.
Florian Krohm [Fri, 26 Sep 2025 22:01:46 +0000 (22:01 +0000)] 
Fix file permissions.

The following files do not need to be executable:
- configure.ac
- Makefile*am
- *.in

The following files lack execute permission:
- tests/platform_test
- tests/vg_regtest
- perf/vg_perf

So from now on you can just run  tests/vg_regtest and perf/vg_perf
without the perl prefix.
Docs changed accordingly.

8 days agos390: Assorted BFP testsuite tweaks
Florian Krohm [Fri, 26 Sep 2025 21:50:39 +0000 (21:50 +0000)] 
s390: Assorted BFP testsuite tweaks

Rename rounding-1 to bfp-306054 because that was the corresponding BZ.
Rename bfp-3 to bfp-muldiv as it is more expressive.
Only compile testcases for 128-bit BFP if the compiler supports -mlong-double-128.
Add -mlong-double-128 to the compile flags for the files that need it.

This concludes fixing https://bugs.kde.org/show_bug.cgi?id=509572

10 days agoDeal with linux arches that don't have getdents, only getdents64
Mark Wielaard [Wed, 24 Sep 2025 21:16:29 +0000 (23:16 +0200)] 
Deal with linux arches that don't have getdents, only getdents64

Not all linux arches have getdents, some newer arches (arm64 and
riscv64) only implement getdents64. So only use the function
filter_valgrind_fds_from_getdents_with_refill on linux with
__NR_getdents.

Also move the getdents_filter testcase under none/tests/linux and only
use getdents64.

Fixes: e8e4066c3a01 ("Filter Valgrind FDs from getdents syscalls")
https://bugs.kde.org/show_bug.cgi?id=331311

10 days agos390: Remove rounding-6 BFP testcase (convert to int)
Florian Krohm [Wed, 24 Sep 2025 20:54:22 +0000 (20:54 +0000)] 
s390: Remove rounding-6 BFP testcase (convert to int)

Should have been part of 18c5454874d.

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

10 days agos390: Reorg and extend BFP "convert to/from fixed/logical" testcases
Florian Krohm [Wed, 24 Sep 2025 20:27:30 +0000 (20:27 +0000)] 
s390: Reorg and extend BFP "convert to/from fixed/logical" testcases

Testing these insns was spread over 3 testcases: rounding-3, fpconv,
and fpext.

rounding-3 was testing "convert to fixed" with rounding per FPC.
fpext was testing "convert to/from logical" with rounding per M3 field.
fpconv was testing "convert to/from fixed" with rounding per M3 field.

The new testcase bfp-convert replaces these 3.  It removes the
"convert from fixed/logical" testing because that is done in bfp-emit.pl.
It consolidates end extends "convert to fixed/logical" testing from
those files.

Testing "convert to logical" has been commented out until the condition
code weirdness for negative input values has been sorted.

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

11 days agoFilter Valgrind FDs from getdents syscalls
Alexandra Hájková [Tue, 12 Aug 2025 16:17:54 +0000 (12:17 -0400)] 
Filter Valgrind FDs from getdents syscalls

This change prevents client programs from seeing Valgrind's internal file
descriptors when scanning /proc/self/fd or /proc/<pid>/fd.

This patch modifies the getdents and getdents64 syscall wrappers to
selectively filter out Valgrind's internal file descriptors only when
listing /proc/*/fd directories for the current process.

Add none/tests/getdents_filter.vgtest test that tests that the
Valgrind's file descriptors are hidden from the client program
and verifies both /proc/self/fd filtering and that regular
directory listings remain unfiltered.

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

11 days agos390: Add missing BFP rounding mode conversions
Florian Krohm [Tue, 23 Sep 2025 20:29:19 +0000 (20:29 +0000)] 
s390: Add missing BFP rounding mode conversions

Function decode_bfp_rounding_mode:
- Irrm_NEAREST_TIE_AWAY_0 --> S390_BFP_ROUND_NEAREST_AWAY
- Irrm_PREPARE_SHORTER    --> S390_BFP_ROUND_PREPARE_SHORT

Macros S390_CC_FOR_BFP_CONVERT, S390_CC_FOR_BFP_UCONVERT
- add S390_BFP_ROUND_NEAREST_AWAY
- add S390_BFP_ROUND_PREPARE_SHORT

Macros S390_CC_FOR_BFP128_CONVERT, S390_CC_FOR_BFP128_UCONVERT
- add S390_BFP_ROUND_NEAREST_AWAY
- add S390_BFP_ROUND_PREPARE_SHORT

Fix more out-of-date comments related to rounding.

12 days agoFix an out-of-date comment.
Florian Krohm [Tue, 23 Sep 2025 13:19:58 +0000 (13:19 +0000)] 
Fix an out-of-date comment.

12 days agos390: BFP testsuite: condolidate FPC insns in bfp-insn.c
Florian Krohm [Tue, 23 Sep 2025 13:18:25 +0000 (13:18 +0000)] 
s390: BFP testsuite: condolidate FPC insns in bfp-insn.c

Remove srnm, srnmb, and rounding-2 testcases.
Also test EFPC and LFPC.

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

12 days agos390: BFP testsuite: load positive/negative/complement, load and test
Florian Krohm [Mon, 22 Sep 2025 22:20:57 +0000 (22:20 +0000)] 
s390: BFP testsuite: load positive/negative/complement, load and test

Remove bfp-2. Add bfp-load
Observe condition code!
Also add correct bfp-compare.stdout.exp (c.f. 6190acedb1d)

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

12 days agos390: Add forgotten file bfp-compare.stdout.exp
Florian Krohm [Mon, 22 Sep 2025 20:43:23 +0000 (20:43 +0000)] 
s390: Add forgotten file bfp-compare.stdout.exp

12 days agos390: BFP testsuite: comparison ops
Florian Krohm [Mon, 22 Sep 2025 20:36:45 +0000 (20:36 +0000)] 
s390: BFP testsuite: comparison ops

Rename bfp-4.c -->  bfp-compare.c.
Add more testcases including NANs.

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

13 days agos390: BFP testsuite tweaks
Florian Krohm [Mon, 22 Sep 2025 19:31:50 +0000 (19:31 +0000)] 
s390: BFP testsuite  tweaks

Remove square root tests as they are covered by bfp-emit.pl
Likewise for multiplication.
Add tests for division.
New file bfp-arith.c: Check condition code of arithmetic ops.
Remove bfp-1.c

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

13 days agoFreeBSD regtest: add an x86 version of scalar_arg_check
Paul Floyd [Mon, 22 Sep 2025 18:21:57 +0000 (20:21 +0200)] 
FreeBSD regtest: add an x86 version of scalar_arg_check

13 days agoDRD suppression: broaden drd-glibc-io-xsputn-mempcpy
Paul Floyd [Mon, 22 Sep 2025 17:49:52 +0000 (19:49 +0200)] 
DRD suppression: broaden drd-glibc-io-xsputn-mempcpy

Add wildcards to cover variations of mem[p]cpy. This is now the
same as Helgrind.

13 days agos390: Remove a few BFP testcases
Florian Krohm [Mon, 22 Sep 2025 15:55:23 +0000 (15:55 +0000)] 
s390: Remove a few BFP testcases

Namely: fgx, fixbr, rounding-4, and rounding-5

Those insn tests are covered by bfp-emit.pl
Part of fixing https://bugs.kde.org/show_bug.cgi?id=509572

13 days agos390: Remove none/tests/s390x/tcxb, add none/tests/s390x/bfp-tdc
Florian Krohm [Mon, 22 Sep 2025 15:31:12 +0000 (15:31 +0000)] 
s390: Remove none/tests/s390x/tcxb, add none/tests/s390x/bfp-tdc

tcxb was busted.
Part of fixing https://bugs.kde.org/show_bug.cgi?id=509572

13 days agogdbserver regtest: add return value to sleepers select error message
Paul Floyd [Mon, 22 Sep 2025 12:59:17 +0000 (14:59 +0200)] 
gdbserver regtest: add return value to sleepers select error message

This is failing on FreeBSD 15 (looks like an OS or libc regression).
Improve the error message to make the problem clearer. errno is 0
but select is returning 93 (from a set of 0 fds!).

13 days agos390: New testcase none/tests/s390x/hfp
Florian Krohm [Sun, 21 Sep 2025 21:03:55 +0000 (21:03 +0000)] 
s390: New testcase none/tests/s390x/hfp

Containing the very few needed hexadecimal floating point insns.
Carved out of none/tests/s390x/bfp-2

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

2 weeks agodocs/xml/FAQ.xml: listitems contain paras, not raw CDATA
Mark Wielaard [Sun, 21 Sep 2025 19:38:15 +0000 (21:38 +0200)] 
docs/xml/FAQ.xml: listitems contain paras, not raw CDATA

Fixes: b5c89ee9839a ("Doc: add item on tcmalloc >= 2.16 hangs to FAQ")
2 weeks agodoc: missed closing itemizedlist
Paul Floyd [Sun, 21 Sep 2025 18:57:04 +0000 (20:57 +0200)] 
doc: missed closing itemizedlist

2 weeks agoDoc: add item on tcmalloc >= 2.16 hangs to FAQ
Paul Floyd [Sun, 21 Sep 2025 18:53:33 +0000 (20:53 +0200)] 
Doc: add item on tcmalloc >= 2.16 hangs to FAQ

2 weeks agoRefactor: make try_get_interp extern and multi-plaftorm
Paul Floyd [Sun, 21 Sep 2025 15:08:35 +0000 (17:08 +0200)] 
Refactor: make try_get_interp extern and multi-plaftorm

Previously it was static and defined for Darwin, FreeBSD and Linux.
Now it is global VG_(args_the_exename)  and has a length check.

Also fixed a nasty bug related to VG_(args_the_exename).

Initially this is set to point to the name of the client command
in Valgrinds own arguments. Later when checking for scripts or binaries
VG_(load_script) may get called recursively. If it gets called more than
once it sets VG_(args_the_exename) to point to the new name.
But that is on the stack. Later, if the stack grows too much the
name will get overwritten. I was seeing that with my first versions
of this code in the recursive tests in none/tests/scripts.

Now I'm allocating VG_(args_the_exename) on the heap.

2 weeks agoregtest: add arm64-freebsd to tests/platform_test
Paul Floyd [Sun, 21 Sep 2025 06:07:11 +0000 (08:07 +0200)] 
regtest: add arm64-freebsd to tests/platform_test

Not explicitly listing the platform was causing the one test
to run on other platforms

2 weeks agomemcheck/tests/Makefile.am: Add arm64-freebsd to DIST_SUBDIRS
Mark Wielaard [Sat, 20 Sep 2025 20:31:48 +0000 (22:31 +0200)] 
memcheck/tests/Makefile.am: Add arm64-freebsd to DIST_SUBDIRS

Fixes: 0a9e19a5947a ("FreeBSD regtest: add scalar_arg_check for arm64")
2 weeks agoFreeBSD arm64: arm64 syscalls also only ever need max 7 args
Paul Floyd [Sat, 20 Sep 2025 20:06:08 +0000 (22:06 +0200)] 
FreeBSD arm64: arm64 syscalls also only ever need max 7 args

2 weeks agoFreeBSD regtest: add scalar_arg_check for arm64
Paul Floyd [Sat, 20 Sep 2025 19:01:22 +0000 (21:01 +0200)] 
FreeBSD regtest: add scalar_arg_check for arm64

Much the same as arm64. x86 otoh is the only FreeBSD platform to use
PRE_REG_READ8 (again for sendfile).

2 weeks agoFreeBSD amd64: amd64 syscalls only ever need max 7 args
Paul Floyd [Sat, 20 Sep 2025 17:20:50 +0000 (19:20 +0200)] 
FreeBSD amd64: amd64 syscalls only ever need max 7 args

The only possible exception would be a syscall0 of SYS_sendfile
done by the host. Since we're never going to do that reduce the number
of arguments to 7.

2 weeks agoFreeBSD regtest: forgot the makefile changes for amd64 scalar_arg_check
Paul Floyd [Sat, 20 Sep 2025 17:19:46 +0000 (19:19 +0200)] 
FreeBSD regtest: forgot the makefile changes for amd64 scalar_arg_check

2 weeks agoFreeBSD regtest: add an amd64 test that max nb args to a syscall get passed correctly
Paul Floyd [Sat, 20 Sep 2025 17:16:38 +0000 (19:16 +0200)] 
FreeBSD regtest: add an amd64 test that max nb args to a syscall get passed correctly

2 weeks agos390: Add bfp-emit.pl (BZ 509572)
Florian Krohm [Fri, 19 Sep 2025 22:06:27 +0000 (22:06 +0000)] 
s390: Add bfp-emit.pl  (BZ 509572)

For a BFP insn X in the guest code the same insn will be emitted in
the jitted code. This does not hold universally but for most BFP
insns it does.
bfp-emit.pl contains a complete list of all BFP insns as of Principles
of Operations SA22-7832-14. It tests all insns for which the above
observation is true and ensures the emitted insn matches the insn in
the guest code.

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

2 weeks agoWrap the mount_setattr syscall 442
Martin Cermak [Fri, 19 Sep 2025 15:25:30 +0000 (17:25 +0200)] 
Wrap the mount_setattr syscall 442

int syscall(SYS_mount_setattr, int dirfd, const char *pathname,
           unsigned int flags, struct mount_attr *attr, size_t size);

The mount_setattr() system call changes the mount properties of a
mount or an entire mount tree.  If pathname is a relative pathname,
then it is interpreted relative to the directory referred to by the
file descriptor dirfd.  If dirfd is the special value AT_FDCWD, then
pathname is interpreted relative to the current working directory of
the calling process.  If pathname is the empty string and
AT_EMPTY_PATH is specified in flags, then the mount properties of the
mount identified by dirfd are changed

Declare a mount_setattr 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

Part of this update also is a fix of the sys_move_mount wrapper.
Specifically there was a typo mount_moce vs. move_mount, and also
there was a problem in handling VKI_AT_FDCWD special fd value in the
check for to_fd and to_pathname.

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

2 weeks agoFreeBSD regtest: add syscall 9999 to scalar
Paul Floyd [Fri, 19 Sep 2025 17:57:07 +0000 (19:57 +0200)] 
FreeBSD regtest: add syscall 9999 to scalar

This provokes an unhandled syscall message, as is done on other
platforms. Update filter since scalar runs on all FreeBSD
platforms.

2 weeks agoWrap the setdomainname syscall
Martin Cermak [Fri, 19 Sep 2025 07:31:39 +0000 (09:31 +0200)] 
Wrap the setdomainname syscall

The setdomainname() call sets the domain name to the value given in the
character array name.  The len argument specifies the number of bytes in
name.  (Thus, name does not require a terminating null byte.)

Declare a setdomainname 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=369030

2 weeks agoFix none/tests/s390x/disasm-test/Makefile.am
Florian Krohm [Fri, 19 Sep 2025 16:06:39 +0000 (16:06 +0000)] 
Fix none/tests/s390x/disasm-test/Makefile.am

Remove disasm-test.stdout.exp from Makefile.am.
This was fogotten in 3d224b85ac.

2 weeks agos390: Tweak disasm-test
Florian Krohm [Fri, 19 Sep 2025 15:25:00 +0000 (15:25 +0000)] 
s390: Tweak disasm-test

Remove stdout.exp file as it is not needed.
The mandatory .stderr.exp file was not empty even though disasm-test
does not write anything to stderr. Annoying!
../filter_stderr was doing it. Adjust filter_stderr accordingly and
let .stderr.exp reflect the actual output.

2 weeks agoAdd missing ppc64-linux and s390x-linux syswraps existing on other arches
Martin Cermak [Fri, 19 Sep 2025 09:47:14 +0000 (11:47 +0200)] 
Add missing ppc64-linux and s390x-linux syswraps existing on other arches

This update adds following ppc64le and s390x syswraps:
 - sys_msgctl
 - sys_semctl
 - sys_semtimedop
 - sys_sethostname
 - sys_shmctl
 - sys_sigpending
 - sys_stime

This update adds following ppc64le syswraps:
 - sys_setns

This update adds following s390x syswraps:
 - sys_bpf

Blacklist the shmctl05, as it is a long running one.  It does
pass on all architectures afaics, but needs a relatively high
LTP_TIMEOUT_MUL setting. So, let's skip that one.

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

2 weeks agos390: disasm-test: Fix a few opcode specs.
Florian Krohm [Fri, 19 Sep 2025 15:15:39 +0000 (15:15 +0000)] 
s390: disasm-test: Fix a few opcode specs.

Namely: eedtr, eextr, esdtr, esxtr, iedtr, iextr, rrdtr, rrxtr
Wrong register class was used.
binutils 2.44 let that slide by. 2.45 does not.

2 weeks agoVEX: Remove isZeroU1 and isOneU1
Florian Krohm [Thu, 18 Sep 2025 21:48:12 +0000 (21:48 +0000)] 
VEX: Remove isZeroU1 and isOneU1

Use isZeroU / isOneU instead. One function to rule them all.

2 weeks agoVEX core constification.
Florian Krohm [Thu, 18 Sep 2025 21:35:32 +0000 (21:35 +0000)] 
VEX core constification.

2 weeks agos390-runone overhaul
Florian Krohm [Thu, 18 Sep 2025 21:06:31 +0000 (21:06 +0000)] 
s390-runone overhaul

Rewritten in perl.
Command line options added.
Minimise assembler file by throwing out any function prologue stuff GCC
might stick into a function. Also remove insns following the svc as they
are not reachable.
Error handling: capture errors/warnings from the assembler.

Why all this? https://bugs.kde.org/show_bug.cgi?id=509572

2 weeks agoconfigure.ac: Add no-dist-gzip to AM_INIT_AUTOMAKE options
Mark Wielaard [Thu, 18 Sep 2025 20:03:08 +0000 (22:03 +0200)] 
configure.ac: Add no-dist-gzip to AM_INIT_AUTOMAKE options

We only distribute the tar.bz2 so don't produce the tar.gz
unnecessarily.

2 weeks agoWrap the quotactl_fd syscall
Martin Cermak [Wed, 17 Sep 2025 14:08:05 +0000 (16:08 +0200)] 
Wrap the quotactl_fd syscall

SYSCALL_DEFINE4(quotactl_fd,
    unsigned int, fd,
    unsigned int, cmd,
    qid_t, id,
    void __user *, addr)

The quotactl_fd works in a similar way to quotactl.  They both manipulate
disk quotas.  They differ in how the target file system is specified.
While quotactl takes path, quotactl_fd takes a file descriptor.

Declare a quotactl_fd 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=509567

2 weeks agoAdd ltp-patch to correct scanf address format for mmap04
Mark Wielaard [Thu, 18 Sep 2025 15:36:40 +0000 (17:36 +0200)] 
Add ltp-patch to correct scanf address format for mmap04

2 weeks agoRun the LTP tests with LTP_QUIET
Martin Cermak [Wed, 17 Sep 2025 14:27:09 +0000 (16:27 +0200)] 
Run the LTP tests with LTP_QUIET

Introduce a new LTP_QUIET env var which suppresses certain
types of LTP log messages, specifically TCONF, TWARN, TINFO,
and TDEBUG.  This helps us keep the test logs briefer, while
still keeping the important information in the logs.

This update avoids several false positives, specifically with
the following testcases: eventfd2_03, shmctl05, mlock03,
poll02, prctl09, setsockopt10, and select02.

This update also adds a brief summary for the LTP testsuite,
something like the following:

> ...
> [6/7] Testing select02 ...
> [7/7] Testing setsockopt10 ...
>
> Brief LTP test results summary
> -----------------------------------------
> PASS: 6
> FAIL: 1
> -----------------------------------------
>
> TESTING FINISHED, logs in ...

Also fix the way -j param spec in auxprogs/Makefile.am.

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

3 weeks agoFreeBSD DRD: add suppression for _malloc_postfork
Paul Floyd [Sun, 14 Sep 2025 12:00:46 +0000 (12:00 +0000)] 
FreeBSD DRD: add suppression for _malloc_postfork

For FreeBSD 15

2 weeks agoFreeBSD regtest: clean up none auxv test
Paul Floyd [Wed, 17 Sep 2025 18:05:09 +0000 (20:05 +0200)] 
FreeBSD regtest: clean up none auxv test

I got fed up with this changing all the time, needing endless
expecteds for x86, amd65, arm64, and each FreeBSD version

So now I'm generating the expected on the fly, doing the same auxv
filtering as previously plus swapping unsupported AT_ values
with AT_IGNORE / number 01. The awk script will still need occasional
maintenance but it should be less frequent.

2 weeks agoLinux clang: fix 2 build warnings and 1 error in tests
Paul Floyd [Wed, 17 Sep 2025 10:52:07 +0000 (12:52 +0200)] 
Linux clang: fix 2 build warnings and 1 error in tests

clang++ not supporting sized deallocation by default is a bit
annoying.

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