]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
5 months agoriscv64: Add initial support: new port-specific test files
Petr Pavlu [Tue, 11 Apr 2023 19:30:42 +0000 (19:30 +0000)] 
riscv64: Add initial support: new port-specific test files

The following people contributed to the initial RISC-V support:
Petr Pavlu <petr.pavlu@dagobah.cz>
Xeonacid <h.dwwwwww@gmail.com>
laokz <laokz@foxmail.com>
Chelsea E. Manning <me@xychelsea.is>
zhaomingxin <zhaomingxin.zmx@alibaba-inc.com>
Jojo R <rjiejie@linux.alibaba.com>

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

5 months agoriscv64: Add initial support: new port-specific VEX files
Petr Pavlu [Tue, 11 Apr 2023 19:30:42 +0000 (19:30 +0000)] 
riscv64: Add initial support: new port-specific VEX files

The following people contributed to the initial RISC-V support:
Petr Pavlu <petr.pavlu@dagobah.cz>
Xeonacid <h.dwwwwww@gmail.com>
laokz <laokz@foxmail.com>
Chelsea E. Manning <me@xychelsea.is>
zhaomingxin <zhaomingxin.zmx@alibaba-inc.com>
Jojo R <rjiejie@linux.alibaba.com>

Some integration fixes were added by Mark Wielaard <mark@klomp.org>
- Handle Ity_I1, Iex.Const (boolean)

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

5 months agoriscv64: Add initial support: new port-specific Valgrind files
Petr Pavlu [Tue, 11 Apr 2023 19:30:42 +0000 (19:30 +0000)] 
riscv64: Add initial support: new port-specific Valgrind files

The following people contributed to the initial RISC-V support:
Petr Pavlu <petr.pavlu@dagobah.cz>
Xeonacid <h.dwwwwww@gmail.com>
laokz <laokz@foxmail.com>
Chelsea E. Manning <me@xychelsea.is>
zhaomingxin <zhaomingxin.zmx@alibaba-inc.com>
Jojo R <rjiejie@linux.alibaba.com>

Some integration fixes were added by Mark Wielaard <mark@klomp.org>
- Remove POST handler from sys_close
- Define VKI_O_DIRECT in vki-riscv64-linux.h
- Wrap riscv64-linux mlock2
- Add POST handler for sys_readlinkat

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

5 months agoIllumos regtest: update bug487993 testcase
Paul Floyd [Sun, 16 Feb 2025 08:36:54 +0000 (09:36 +0100)] 
Illumos regtest: update bug487993 testcase

As I said in bugzilla, "Not tested on Solaris". Now I've tested it
and Illumos libc doesn't use 16byte alignment (or at least the assert
that alignment is 16bytes fails).

5 months agoIllumos regtest: update memcheck dw4 expeected
Paul Floyd [Sun, 16 Feb 2025 07:43:19 +0000 (08:43 +0100)] 
Illumos regtest: update memcheck dw4 expeected

The exp-solaris version was the same as the exp one.

5 months agoIllumos regtest: add a suppression for leak_cpp_intertior libstdc++.supp
Paul Floyd [Sun, 16 Feb 2025 07:38:58 +0000 (08:38 +0100)] 
Illumos regtest: add a suppression for leak_cpp_intertior libstdc++.supp

5 months agoIllumos regtest: getrandom uses a different syscall number from Solaris
Paul Floyd [Sun, 16 Feb 2025 06:57:43 +0000 (07:57 +0100)] 
Illumos regtest: getrandom uses a different syscall number from Solaris

It doesn't look like the syscall interface changed, just the number.

5 months agoIllumos regtest: improve filters
Paul Floyd [Sat, 15 Feb 2025 19:30:11 +0000 (20:30 +0100)] 
Illumos regtest: improve filters

filter_fdleak - move the Solaris filters earlier, there is a multiline awk filter
that was being affected by the arm/FreeBSD filters

coredump filter is different between Solaris and Illumos

5 months agoIllumos regtest: add a filter for crt start
Paul Floyd [Sat, 15 Feb 2025 15:25:23 +0000 (16:25 +0100)] 
Illumos regtest: add a filter for crt start

Was causing a failure in one Massif test

5 months agoBug 496370 - Illumos: signal handling is broken
Paul Floyd [Fri, 14 Feb 2025 19:45:02 +0000 (20:45 +0100)] 
Bug 496370 - Illumos: signal handling is broken

This isn't a great fix, it just turns off optimization for
a couple of signal frame functions. If ever I have time I'll try
to find out out which part of -O1 is responsible, and maybe from
that also exactly what part of the code.

5 months agoSoalris suppressions for pthread_once and gomp init
Paul Floyd [Fri, 14 Feb 2025 19:42:33 +0000 (20:42 +0100)] 
Soalris suppressions for pthread_once and gomp init

5 months agoSolaris regtest: add a suppression to helgrind/tests/bug392331.supp
Paul Floyd [Fri, 14 Feb 2025 19:36:52 +0000 (20:36 +0100)] 
Solaris regtest: add a suppression to helgrind/tests/bug392331.supp

5 months agoSolaris regtest: add a suppression for GCC 12 libstdc++ memcheck leak_cpp_interior
Paul Floyd [Fri, 14 Feb 2025 18:34:27 +0000 (19:34 +0100)] 
Solaris regtest: add a suppression for GCC 12 libstdc++ memcheck leak_cpp_interior

5 months agoSolaris regtest: add to fdleak filter for file_dclose
Paul Floyd [Fri, 14 Feb 2025 07:15:00 +0000 (08:15 +0100)] 
Solaris regtest: add to fdleak filter for file_dclose

5 months agoRevert "FreeBSD regtest: Implement setaffinity in gdb sleepers for nlvgdbsigqueue"
Paul Floyd [Sun, 9 Feb 2025 07:21:58 +0000 (08:21 +0100)] 
Revert "FreeBSD regtest: Implement setaffinity in gdb sleepers for nlvgdbsigqueue"

This reverts commit 98cc2209b5c1690a8d181d372c6a248fbd3b2134.

5 months agoFreeBSD regtest: a couple of updates for FreeBSD 13.5 x86
Paul Floyd [Sat, 8 Feb 2025 20:47:38 +0000 (21:47 +0100)] 
FreeBSD regtest: a couple of updates for FreeBSD 13.5 x86

5 months agoLinux regtest: broaden none/tests/linux/bug498317.supp
Paul Floyd [Sat, 8 Feb 2025 09:35:38 +0000 (10:35 +0100)] 
Linux regtest: broaden none/tests/linux/bug498317.supp

fcntl function name is versioned on Raspberry Pi OS
(fcntl@@GLIBC_2.28) so use a wildcard in the suppression.

5 months agoFreeBSD regtest: Implement setaffinity in gdb sleepers for nlvgdbsigqueue
Paul Floyd [Fri, 7 Feb 2025 20:29:23 +0000 (21:29 +0100)] 
FreeBSD regtest: Implement setaffinity in gdb sleepers for nlvgdbsigqueue

Doesn't seem to help, the test is still very flaky on recent (2025) hardware.

5 months agoRemove exec bits on a few files and delete a Solaris regtest binary
Paul Floyd [Fri, 7 Feb 2025 11:37:04 +0000 (12:37 +0100)] 
Remove exec bits on a few files and delete a Solaris regtest binary

Pushed the binary by mistake in Sept 2023!

5 months agoFreeBSD regtest: add arm64 expected for auxv_script test
Paul Floyd [Fri, 7 Feb 2025 07:38:38 +0000 (08:38 +0100)] 
FreeBSD regtest: add arm64 expected for auxv_script test

5 months agoFreeBSD DRD: cleanup suppressions
Paul Floyd [Thu, 6 Feb 2025 20:49:59 +0000 (21:49 +0100)] 
FreeBSD DRD: cleanup suppressions

There were quite a lot that duplicated the top level libthr.so.3 suppression.

5 months agoBug 396415 - Valgrind is not looking up $ORIGIN rpath of shebang programs
Paul Floyd [Thu, 6 Feb 2025 19:23:42 +0000 (20:23 +0100)] 
Bug 396415 - Valgrind is not looking up $ORIGIN rpath of shebang programs

5 months agoFreeBSD syscall: improve utrace wrapper
Paul Floyd [Tue, 4 Feb 2025 19:34:57 +0000 (20:34 +0100)] 
FreeBSD syscall: improve utrace wrapper

The public wrapper is just a void pointer and length.
Internally, the struct used has holes which generate
errors (since ld.so which is probably the only user
of this syscall doesn't memset the struct to zero). Added
the struct definition and PRE_MEM_READ for each field.

6 months agoBug499183 - FreeBSD: differences in avx-vmovq output
Paul Floyd [Tue, 28 Jan 2025 18:25:52 +0000 (19:25 +0100)] 
Bug499183 - FreeBSD: differences in avx-vmovq output

6 months agoLet gdbserver the support of 'x' packet by adding binary-upload+ in qSupported.
Philippe Waroquiers [Tue, 28 Jan 2025 14:33:15 +0000 (15:33 +0100)] 
Let gdbserver the support of 'x' packet by adding binary-upload+ in qSupported.

Following the incompatible implementation of the 'x' packet between
lldb and gdb, gdb now only uses the x packet if the gdbserver
reports binary-upload+ in qSupported.

Tested with gdb 16.1, gdb 16 branch and gdb 17 trunk, each time checking
the 'x' packet was effectively used.

6 months agoFreeBSD regtest: update getrlimitusage
Paul Floyd [Tue, 28 Jan 2025 08:47:17 +0000 (09:47 +0100)] 
FreeBSD regtest: update getrlimitusage

Different system, diffeent number of allowed pseudo-terminals. So set it to 0.

6 months agoBug 499212 - mmap() with MAP_ALIGNED() returns unaligned pointer
Paul Floyd [Tue, 28 Jan 2025 08:44:24 +0000 (09:44 +0100)] 
Bug 499212 - mmap() with MAP_ALIGNED() returns unaligned pointer

6 months agoDarwin syscall: add wrapper for mkdirat
Paul Floyd [Sun, 26 Jan 2025 06:21:08 +0000 (07:21 +0100)] 
Darwin syscall: add wrapper for mkdirat

6 months agoregtest: update mcsig[no]pass expecteds
Paul Floyd [Sun, 26 Jan 2025 06:02:22 +0000 (07:02 +0100)] 
regtest: update mcsig[no]pass expecteds

Line number change due to adding different signal type to
faultstatus test for macOS.

6 months agoDarwin regtest: update none faultstatus test
Paul Floyd [Sat, 25 Jan 2025 20:16:37 +0000 (21:16 +0100)] 
Darwin regtest: update none faultstatus test

Test 2 on Darwin generated SIGBUS not SIGSEGV.

6 months agoregtest: slacken timing in none/tests/bug492678 again
Paul Floyd [Sat, 25 Jan 2025 20:03:30 +0000 (21:03 +0100)] 
regtest: slacken timing in none/tests/bug492678 again

5us was still a bit tight. 10us looks a lot more reliable.

6 months agoregtest: slacken timing in none/tests/bug492678
Paul Floyd [Sat, 25 Jan 2025 19:09:40 +0000 (20:09 +0100)] 
regtest: slacken timing in none/tests/bug492678

With a 1us interval some systems intermittently (but quite
frequently) hang. Increasing it to 5us seems to make it
consistent. Will keep an eye on this one.

6 months agoregtest: get the configure.ac check for timer_delete correct
Paul Floyd [Sat, 25 Jan 2025 18:55:49 +0000 (19:55 +0100)] 
regtest: get the configure.ac check for timer_delete correct

6 months agoregtest macOS: macOS has no timer fds, so not timer_create etc.
Paul Floyd [Sat, 25 Jan 2025 18:24:00 +0000 (19:24 +0100)] 
regtest macOS: macOS has no timer fds, so not timer_create etc.

Add a feature test for timer_delete.

6 months agoBug 492678 - forgot to add vgtest file
Paul Floyd [Sat, 25 Jan 2025 16:57:35 +0000 (17:57 +0100)] 
Bug 492678 - forgot to add vgtest file

6 months agoBug 492678 - SIGALRM race condition (sighandler called after timer disarmed
Paul Floyd [Sat, 25 Jan 2025 13:54:08 +0000 (14:54 +0100)] 
Bug 492678 - SIGALRM race condition (sighandler called after timer disarmed

6 months agonone/tests/fdleak_cmsg_supp.supp: Add suppressions for older glibc
Mark Wielaard [Thu, 23 Jan 2025 22:29:19 +0000 (23:29 +0100)] 
none/tests/fdleak_cmsg_supp.supp: Add suppressions for older glibc

glibc 2.17 used __accept_nocancel and __recvmsg_nocancel as function
names for accept and recvmsg.

6 months agomemcheck/tests/amd64/rh2257546_256.c: use xmm instead of ymm in clobbers
Mark Wielaard [Thu, 23 Jan 2025 21:59:42 +0000 (22:59 +0100)] 
memcheck/tests/amd64/rh2257546_256.c: use xmm instead of ymm in clobbers

Older gcc (4.8.5) doesn't recognize yym registers as clobbers. Use xmm
instead, as in the AVX configure checks, which are the same register
(half) just with a different name.

6 months agoCheck for and compile using -std=gnu11 (or higher)
Mark Wielaard [Thu, 23 Jan 2025 18:33:57 +0000 (19:33 +0100)] 
Check for and compile using -std=gnu11 (or higher)

Use gnulib m4/std-gnu11.m4 for that.

Also update the minimum autoconf version to 2.69. And the minimum
automake to 1.13. This lets us clean up configure.ac a little.

We would really like 2.70+ so we don't need the gnulib gnu11.m4. But
2.69 still seems in use on various stable systems. autoconf 2.70
was released end of 2020, autoconf 2.69 in 2012.

6 months agoTreat all inherited file descriptors the same with --track-fds.
Mark Wielaard [Thu, 23 Jan 2025 14:50:52 +0000 (15:50 +0100)] 
Treat all inherited file descriptors the same with --track-fds.

We used to special case 0, 1, 2 (stdin/out/err) specially even when
they were not inherited (anymore). Now the --track-fds=[yes|all]
option treats all inherited file descriptors the same. And if any
inherited file descriptor gets closed and reopened then they are
now treated as normal non-inherited file descriptors.

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

6 months agogdbserver_tests: filter out new Missing rpms message
Mark Wielaard [Thu, 16 Jan 2025 16:30:37 +0000 (17:30 +0100)] 
gdbserver_tests: filter out new Missing rpms message

As seen on the fedora 40 s390x tester. GDB now might output something
like:

Missing rpms, try: dnf --enablerepo='*debug*' install glibc-debuginfo-2.39-33.fc40.s390x

Filter those messages out to get zero fail test results again.

6 months agoppc test_dfp2 build fix for GCC 15
Mark Wielaard [Wed, 15 Jan 2025 15:27:12 +0000 (16:27 +0100)] 
ppc test_dfp2 build fix for GCC 15

GCC 15 defaults to C23 which changes the meaning of unprototyped
functions, those declaring no arguments with (). Causing some errors:

test_dfp2.c:412:26: error: initialization of 'void (*)(void)' from incompatible pointer type 'void (*)(int)' [-Wincompatible-pointer-types]
  412 |                        { &_test_dscri,  "dscri",   dfp_2args_x1, 20, LONG_TEST, ">>", True},
      |                          ^
test_dfp2.c:412:26: note: (near initialization for 'dfp_two_arg_tests[0].test_func')
test_dfp2.c:110:13: note: '_test_dscri' declared here
  110 | static void _test_dscri (int shift)
      |             ^~~~~~~~~~~

test_dfp2.c:664:17: error: assignment to 'test_func_t' {aka 'void (*)(void)'} from incompatible pointer type 'test_func_main_t' {aka 'void (*)(int)'} [-Wincompatible-pointer-types]
  664 |    while ((func = all_tests[i].test_category)) {
      |                 ^
test_dfp2.c:237:16: note: 'test_func_t' declared here
  237 | typedef void (*test_func_t)();
      |                ^~~~~~~~~~~
test_dfp2.c:238:16: note: 'test_func_main_t' declared here
  238 | typedef void (*test_func_main_t)(int);
      |                ^~~~~~~~~~~~~~~~
test_dfp2.c:667:8: error: too many arguments to function 'func'; expected 0, have 1
  667 |       (*func)(has_vsx);
      |       ~^~~~~~ ~~~~~~~

Fix this by just explicitly compiling that code with -std=gnu99.

6 months agoBug 498492 - none/tests/amd64/lzcnt64 crashes on FreeBSD compiled with clang
Paul Floyd [Sat, 11 Jan 2025 11:28:00 +0000 (12:28 +0100)] 
Bug 498492 - none/tests/amd64/lzcnt64 crashes on FreeBSD compiled with clang

Using push in inline asm is a bit risky. It worked by luck with
GCC. Fix it by shifting down RSP by 1024 and before the test
and restoring it after.

6 months agoFreeBSD regtest: rename testcase
Paul Floyd [Sat, 11 Jan 2025 11:20:12 +0000 (12:20 +0100)] 
FreeBSD regtest: rename testcase

Running on VirtualBox, this bug452274 runs extremely slowly. Not sure why.
On real hardware it runs in a second or less. When looking at it I saw that
it uses the wrong bugzilla ID, so fix that.

6 months agoregtest: broaden none/tests/linux/bug498317 suppression for PPC
Paul Floyd [Wed, 8 Jan 2025 20:29:23 +0000 (21:29 +0100)] 
regtest: broaden none/tests/linux/bug498317 suppression for PPC

6 months agolinux: support EVIOCGRAB ioctl
Mark Wielaard [Wed, 8 Jan 2025 15:52:03 +0000 (16:52 +0100)] 
linux: support EVIOCGRAB ioctl

EVIOCGRAB just takes an int argument.

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

6 months agoregest: add missing exp to EXTRA_DIST
Paul Floyd [Tue, 7 Jan 2025 21:07:25 +0000 (22:07 +0100)] 
regest: add missing exp to EXTRA_DIST

6 months agoregtest: forgot to add the right options for bug98317 on FreeBSD
Paul Floyd [Tue, 7 Jan 2025 12:50:38 +0000 (13:50 +0100)] 
regtest: forgot to add the right options for bug98317 on FreeBSD

6 months agoregtest: add a Linux version of test for bug498317
Paul Floyd [Tue, 7 Jan 2025 12:34:56 +0000 (13:34 +0100)] 
regtest: add a Linux version of test for bug498317

6 months agoBug 498317 - FdBadUse is not a valid CoreError type in a suppression even though...
Paul Floyd [Tue, 7 Jan 2025 07:05:20 +0000 (08:05 +0100)] 
Bug 498317 - FdBadUse is not a valid CoreError type in a suppression even though it's generated by --gen-suppressions=yes

7 months agoAdd use of QT_ENABLE_REGEXP_JIT env var to FAQ
Paul Floyd [Fri, 3 Jan 2025 21:04:27 +0000 (22:04 +0100)] 
Add use of QT_ENABLE_REGEXP_JIT env var to FAQ

Prevents huge numbers of errors with Qt apps.

7 months agomips: Add some missing syscalls for mips32
Petar Jovanovic [Thu, 26 Dec 2024 17:27:01 +0000 (17:27 +0000)] 
mips: Add some missing syscalls for mips32

Add a number of missing system calls for mips32-linux.
Verified using appropriate LTP tests.

Signed-off-by: Aleksandar Rikalo <arikalo@gmail.com>
7 months agomemcheck/tests/sh-mem-random.c: Set huge_addr to 240GB
Mark Wielaard [Tue, 24 Dec 2024 18:11:17 +0000 (19:11 +0100)] 
memcheck/tests/sh-mem-random.c: Set huge_addr to 240GB

https://www.kernel.org/doc/html/next/riscv/vm-layout.html
Says RISC-V Linux Kernel SV39 user-space virtual memory ends at 256GB.
So try at 240GB. This seems a reasonable value for other arches too.

https://bugs.kde.org/show_bug.cgi?id=468575#c78

7 months agoMinor changes to the documentation and commends related to demangling.
Philippe Waroquiers [Wed, 25 Dec 2024 15:08:04 +0000 (16:08 +0100)] 
Minor changes to the documentation and commends related to demangling.

7 months agoregtest: callgrind bug497723 again, order of output can vary
Paul Floyd [Mon, 23 Dec 2024 08:22:45 +0000 (09:22 +0100)] 
regtest: callgrind bug497723 again, order of output can vary

The filter was picking up two mangled names but the order
of thw two can vary between systems. So just filter one of them.

7 months agoregtest: add check for -Wl,--no-warn-execstack
Paul Floyd [Sun, 22 Dec 2024 15:49:11 +0000 (16:49 +0100)] 
regtest: add check for -Wl,--no-warn-execstack

7 months agoAdd missing zstd.h to coregrind Makefile.am noinst_HEADERS
Florian Krohm [Sun, 22 Dec 2024 09:53:03 +0000 (10:53 +0100)] 
Add missing zstd.h to coregrind Makefile.am noinst_HEADERS

The header was missing from dist tarballs

7 months agoBug 497723 - tweak awk filter in regtest
Paul Floyd [Sun, 22 Dec 2024 07:37:12 +0000 (08:37 +0100)] 
Bug 497723 - tweak awk filter in regtest

7 months agoBug 497723 - forgot to restore callgrind output cleanup
Paul Floyd [Sat, 21 Dec 2024 20:32:19 +0000 (21:32 +0100)] 
Bug 497723 - forgot to restore callgrind output cleanup

7 months agoCommand line help - demangling isn't just for C++
Paul Floyd [Sat, 21 Dec 2024 20:30:45 +0000 (21:30 +0100)] 
Command line help - demangling isn't just for C++

Make the first line generic and add a list of languages
that are suppoted.

7 months agoBug 497723 - improve filter
Paul Floyd [Sat, 21 Dec 2024 20:27:23 +0000 (21:27 +0100)] 
Bug 497723 - improve filter

Just print out the function names. Previously it was unstable.

7 months agoBug 497723 - Enabling Ada demangling breaks callgrind differentiation between overloa...
Paul Floyd [Sat, 21 Dec 2024 19:46:40 +0000 (20:46 +0100)] 
Bug 497723 - Enabling Ada demangling breaks callgrind differentiation between overloaded functions and procedures

7 months agoregtest: turn off exec stack warning
Paul Floyd [Sat, 21 Dec 2024 16:18:35 +0000 (17:18 +0100)] 
regtest: turn off exec stack warning

Rather than turning off exec stack.

7 months agoImplement the new GDB 16.0 'x addr,len' packet.
Philippe Waroquiers [Sat, 21 Dec 2024 14:45:20 +0000 (15:45 +0100)] 
Implement the new GDB 16.0 'x addr,len' packet.

GDB can read memory faster with this packet than with the 'm addr,len' packet.

7 months agoVEX/priv/ir_opt.c: Also fold Iop_And1 expressions when possible
Mark Wielaard [Sun, 15 Dec 2024 20:26:21 +0000 (21:26 +0100)] 
VEX/priv/ir_opt.c: Also fold Iop_And1 expressions when possible

Treat Iop_And1 just like And16/And32/And64. Fold fully constant And1
expressions and handle And1(x,True), And1(True,x), And1(x,False),
And1(False,x) and And1(x,x).

Make sure isOnesU handles Ico_U1 (isZerosU and sameIRExprs already
did).

https://bugs.kde.org/show_bug.cgi?id=468575#c52

7 months agoUse Ints for fds in PRE and POST sys_close_range
Mark Wielaard [Sat, 14 Dec 2024 22:34:12 +0000 (22:34 +0000)] 
Use Ints for fds in PRE and POST sys_close_range

The double_close_range test failed on riscv64-linux because the
close_range wrapper is using unsigned int and the ARG regwords
directly. Which causes the ARG2 == ~0U check to fail. Explicitly
using Int for the fd arguments fixes this. I am not clear on why
this was only an issue for the riscv port. It seems this patch is
OK for other arches (tested on amd64 and i386).

7 months agoAdd 469782 to NEWS
Paul Floyd [Tue, 17 Dec 2024 19:14:05 +0000 (20:14 +0100)] 
Add 469782 to NEWS

7 months agoBug 497455 - Update drd/scripts/download-and-build-gcc
Paul Floyd [Sun, 15 Dec 2024 14:10:33 +0000 (15:10 +0100)] 
Bug 497455 - Update drd/scripts/download-and-build-gcc

The other script also are likely to need some attention.
This one is probably the most useful for users that want to test OpenMP
aplications with DRD or Helgrind.

7 months agoFreeBSD: add a suppression for reachable from __cxa_exit
Paul Floyd [Sat, 14 Dec 2024 06:31:30 +0000 (07:31 +0100)] 
FreeBSD: add a suppression for reachable from __cxa_exit

7 months agoFreeBSD regtest: update getrlimit for FreeBSD 14.2
Paul Floyd [Tue, 10 Dec 2024 07:49:04 +0000 (08:49 +0100)] 
FreeBSD regtest: update getrlimit for FreeBSD 14.2

More output and memory counts are quite variable.

7 months agoRecognize new DWARF5 DW_LANG constants
Mark Wielaard [Fri, 6 Dec 2024 14:39:25 +0000 (15:39 +0100)] 
Recognize new DWARF5 DW_LANG constants

When using --read-var-info=yes readdwarf3 will try to read and
interpret the CU DW_AT_langauge attribute. Since DWARF5 was released a
number if new language constants have been introduced. See
https://dwarfstd.org/languages.html

GCC15 might start emitting some of these when switching to C23 by
default.

When valgrind --read-var-info=yes encounters an unknown DW_LANG
constant it will produce an error and stop processing any further
DWARF.

Recognize all currently known language constants. In particular
recognize DW_LANG_C17, DW_LANG_C23, DW_LANG_C_plus_plus_17,
DW_LANG_C_plus_plus_20, DW_LANG_C_plus_plus_23, DW_LANG_Fortran18,
DW_LANG_Fortran23, DW_LANG_Ada2005, DW_LANG_Ada2012 and DW_LANG_Rust.

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

7 months agoregtest: fix a warning building none/tests/nestedfns on some platforms
Paul Floyd [Fri, 6 Dec 2024 20:24:50 +0000 (21:24 +0100)] 
regtest: fix a warning building none/tests/nestedfns on some platforms

8 months agos390x: Update instruction list with arch15 insns
Andreas Arnez [Wed, 4 Dec 2024 15:53:17 +0000 (16:53 +0100)] 
s390x: Update instruction list with arch15 insns

Recent commits in Binutils added arch15 instructions to s390-opc.txt.
Since then, the script s390-check-opcodes.pl complains about many insns
that are not known to Valgrind.

Update Valgrind's instruction list to be in synch with Binutils again.
Add the new instructions to s390-opcodes.csv and declare them as "not
implemented".

8 months agoBug 495817 - s390x: Fix disassembly for SEL[G]R and SELFHR
Florian Krohm [Wed, 4 Dec 2024 15:53:17 +0000 (16:53 +0100)] 
Bug 495817 - s390x: Fix disassembly for SEL[G]R and SELFHR

The disassemblies of selr, selgr, and selfhr have their register operands
mixed up, and no extended mnemonics are used.  Fix this.

8 months agoBug 495817 - s390x: Fix disassembly for compare-and-branch/trap insns
Florian Krohm [Wed, 4 Dec 2024 15:53:17 +0000 (16:53 +0100)] 
Bug 495817 - s390x: Fix disassembly for compare-and-branch/trap insns

The insns C[L][G]R[BJ], C[L][G]I[BJ], CL[G]T, and CL[FG]IT are
disassembled incorrectly.  Fix this.

Replace s390_format_RIEv1 with s390_format_R0UU and s390_format_R0IU.
Handling both a signed and unsigned immediate constant field with the same
s390_format_... function does not work.

Add function s390_format_RSY_R0RD for CLT and CLGT.  Those opcodes have
extended mnemonics.  So adjusting the formerly used s390_format_RSY_RURD
wasn't an option as that function is also used for CLM[HY], STCM[HY], and
ICM[HY] which don't have extended mnemonics.

8 months agoBug 495817 - s390x: Fix disassembly for BC[R], BR[C]L, and BIC
Florian Krohm [Wed, 4 Dec 2024 15:53:17 +0000 (16:53 +0100)] 
Bug 495817 - s390x: Fix disassembly for BC[R], BR[C]L, and BIC

The disassembly of the conditional branch insns bc, bcr, brl, brcl, and
bic differs from objdump's output.  Some examples:

*** mismatch VEX: |bic 20,0|               vs objdump: |bic      0,20|
*** mismatch VEX: |bic 20(%r6),0|          vs objdump: |bic      0,20(%r6)|
*** mismatch VEX: |bic 20(%r4),0|          vs objdump: |bic      0,20(%r4,%r0)|
*** mismatch VEX: |bih 20(%r12)|           vs objdump: |bih      20(%r12,%r0)|
*** mismatch VEX: |nopr|                   vs objdump: |nopr     %r6|
*** mismatch VEX: |b         12(%r11)|     vs objdump: |b        12(%r11,%r0)|
*** mismatch VEX: |blh       12(%r11)|     vs objdump: |blh      12(%r11,%r0)|
*** mismatch VEX: |brc       0,.+0|        vs objdump: |jnop     c|
*** mismatch VEX: |brcl      0,.+0|        vs objdump: |jgnop    c|

All fixed with this patch.

Note that the issue with the base register sometimes being suppressed
affects various other insns as well.

8 months agoBug 495817 - s390x: Disassemble cksm, mvcl, and clcl
Florian Krohm [Wed, 4 Dec 2024 15:53:17 +0000 (16:53 +0100)] 
Bug 495817 - s390x: Disassemble cksm, mvcl, and clcl

There is no output from the disassembler for cksm, mvcl, and clcl.  Fix
this.

8 months agoBug 495816 - s390x: Fix disassembler segfault for C[G]RT and CL[G]RT
Florian Krohm [Wed, 4 Dec 2024 15:53:17 +0000 (16:53 +0100)] 
Bug 495816 - s390x: Fix disassembler segfault for C[G]RT and CL[G]RT

The function s390_format_RRF_U0RR() is called with one of the following
xmnm_kind parameters:

   S390_XMNM_CAB     when constructing IR for C[G]RT or CL[G]RT
   S390_XMNM_LOCFHR  for LOCFHR
   S390_XMNM_LOCGR   for LOCGR
   S390_XMNM_LOCR    for LOCR

In all cases it invokes the disassembler without providing a mnemonic:

     if (UNLIKELY(vex_traceflags & VEX_TRACE_FE))
        s390_disasm(ENC3(XMNM, GPR, GPR), xmnm_kind, m3, r1, r2);

But in the first case s390_disasm() processes these arguments as if there
was one:

     case S390_XMNM_CAB:
        mnm  = va_arg(args, HChar *);  // <--- m3
        mask = va_arg(args, UInt);     // <--- r1
        p  += vex_sprintf(p, "%s", mnemonic(cab_operand(mnm, mask)));

Thus, m3 is interpreted as a string which then causes the segfault.

Fix this by

(1) replacing all of S390_XMNM_LOC* and S390_XMNM_STOC* by S390_XMNM_CLS,
(2) passing down the mnemonic to s390_disasm, and
(3) changing function cls_operand() to be symmetric with cab_operand() by
    also taking in the base mnemonic.

Apart from s390_format_RRF_U0RR(), further "load/store on condition"
instructions are handled via s390_format_RIE_RUPIX() and
s390_format_RSY_RDRM().  Adjust these functions accordingly as well.

8 months agos390x: Add `--check-formats' flag to s390-check-opcodes.pl
Florian Krohm [Wed, 4 Dec 2024 15:53:17 +0000 (16:53 +0100)] 
s390x: Add `--check-formats' flag to s390-check-opcodes.pl

Enhance the script s390-check-opcodes.pl: Add the command line option
`--check-formats' to print mismatches in the opcode formats between
guest_s390_toIR.c and s390-opc.txt.

8 months agoFix typo in FAQ.
Paul Floyd [Sun, 1 Dec 2024 20:13:18 +0000 (21:13 +0100)] 
Fix typo in FAQ.

8 months agoAdd bug 494246 to NEWS
Mark Wielaard [Tue, 26 Nov 2024 20:32:59 +0000 (21:32 +0100)] 
Add bug 494246 to NEWS

Bug 494246 syscall fsopen not wrapped was fixed in commit 4044bcea0.
"Add open_tree, move_mount, fsopen, fsconfig, fsmount, fspick linux
syswraps"

8 months agoAdd open_tree, move_mount, fsopen, fsconfig, fsmount, fspick linux syswraps
Mark Wielaard [Tue, 26 Nov 2024 18:00:34 +0000 (19:00 +0100)] 
Add open_tree, move_mount, fsopen, fsconfig, fsmount, fspick linux syswraps

Shared linux syscalls implementing various file system mount tasks.
Since linux kernel version 5.2.

Check arguments and track file descriptors.

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

8 months agoManual: C23 is now officially released
Paul Floyd [Tue, 26 Nov 2024 07:08:37 +0000 (08:08 +0100)] 
Manual: C23 is now officially released

8 months agoRemove standard headers from zstddeclib.c
Paul Floyd [Mon, 25 Nov 2024 20:27:56 +0000 (21:27 +0100)] 
Remove standard headers from zstddeclib.c

Not needed and safer without them.

8 months agoAdd support for landlock_create_ruleset (444), landlock_add_rule (445) and landlock_r...
Peter Seiderer [Mon, 8 Jul 2024 09:05:47 +0000 (11:05 +0200)] 
Add support for landlock_create_ruleset (444), landlock_add_rule (445) and landlock_restrict_self (446) syscalls

- add support for landlock_create_ruleset (444) syscall
- add support for landlock_add_rule (445) syscall
- add support for landlock_restrict_self (446) syscall

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

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
8 months agocoregrind/m_gdbserver/server.h: define memcpy and memset to VG_ variants
Mark Wielaard [Sun, 24 Nov 2024 12:28:14 +0000 (13:28 +0100)] 
coregrind/m_gdbserver/server.h: define memcpy and memset to VG_ variants

Then use memset/memcpy in the coregrind/m_gdbserver code instead of
the VG_ variants.

8 months agoSolaris and Illumos: fix build due to use of memset in zstd code.
Paul Floyd [Sun, 24 Nov 2024 07:36:32 +0000 (08:36 +0100)] 
Solaris and Illumos: fix build due to use of memset in zstd code.

8 months agoAdd additional exp-ppc64le files to EXTRA_DIST
Paul Floyd [Sun, 24 Nov 2024 07:10:51 +0000 (08:10 +0100)] 
Add additional exp-ppc64le files to EXTRA_DIST

8 months agonone/tests/bug234814.c: sa_handler take an int as argument
Mark Wielaard [Sat, 23 Nov 2024 21:59:21 +0000 (22:59 +0100)] 
none/tests/bug234814.c: sa_handler take an int as argument

GCC15 will turn this warning into an error:

bug234814.c: In function 'main':
bug234814.c:20:18: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
   20 |    sa.sa_handler = mysigbus;
      |                  ^

8 months agodrd/tests/swapcontext.c: Rename typedef struct thread_local to threadlocal
Mark Wielaard [Sat, 23 Nov 2024 21:48:03 +0000 (22:48 +0100)] 
drd/tests/swapcontext.c: Rename typedef struct thread_local to threadlocal

Since C23 thread_local is a keyword (thread storage duration).

swapcontext.c:23:16: error: expected '{' before 'thread_local'
   23 | typedef struct thread_local {
      |                ^~~~~~~~~~~~
swapcontext.c:23:16: warning: 'thread_local' is not at beginning of declaration [-Wold-style-declaration]
swapcontext.c:23:16: error: 'thread_local' used with 'typedef'
swapcontext.c:26:3: warning: data definition has no type or storage class
   26 | } thread_local_t;
      |   ^~~~~~~~~~~~~~

8 months agohelgrind/tests/tc17_sembar.c: Remove bool typedef
Mark Wielaard [Sat, 23 Nov 2024 21:37:14 +0000 (22:37 +0100)] 
helgrind/tests/tc17_sembar.c: Remove bool typedef

Since C23 bool is a keyword. Also bool wasn't actually used.

tc17_sembar.c:45:14: error: both 'long' and '_Bool' in declaration specifiers
   45 | typedef long bool;
      |              ^~~~
tc17_sembar.c:45:1: warning: useless type name in empty declaration
   45 | typedef long bool;
      | ^~~~~~~

8 months agoAdd exp and supp patterns for missing main frame for ppc64le
Mark Wielaard [Sat, 23 Nov 2024 20:28:13 +0000 (21:28 +0100)] 
Add exp and supp patterns for missing main frame for ppc64le

In some cases on ppc64le we are missing the main frame.
Add alternative .exp-ppc64le variants for socket_close_xml,
fdleak_cmsg_xml and fdleak_ipv4_xml. And extra suppressions
without a main frame for fdleak_cmsg_supp.

See also commit 04d30049b "Filter away "main" differences in filter_fdleak"

8 months agoBug 496571 - False positive for null key passed to bpf_map_get_next_key syscall.
Ryan Mack [Sat, 23 Nov 2024 17:02:21 +0000 (18:02 +0100)] 
Bug 496571 - False positive for null key passed to bpf_map_get_next_key syscall.

No regtest added because BPF requires privileges. See the bugzilla item
for example usage.

8 months agoTurn off unused result warnings
Paul Floyd [Sat, 23 Nov 2024 07:14:15 +0000 (08:14 +0100)] 
Turn off unused result warnings

8 months agoFreeBSD: fix a few warnings when building with GCC
Paul Floyd [Sat, 23 Nov 2024 07:13:05 +0000 (08:13 +0100)] 
FreeBSD: fix a few warnings when building with GCC

8 months agoregtest: add a fdleak filter for write on write on linux arm64
Paul Floyd [Thu, 21 Nov 2024 07:44:04 +0000 (08:44 +0100)] 
regtest: add a fdleak filter for write on write on linux arm64

8 months agoHelgrind: fix unused result of write warnings
Paul Floyd [Thu, 21 Nov 2024 07:24:35 +0000 (08:24 +0100)] 
Helgrind: fix unused result of write warnings

Thanks to GCC deciding that we can't ignore wur annotated
functions by casting to void we need to do otherwise. It was
either pragmas or adding an annotated unused local. Pragmas
seem to be the least awful.

8 months agoBug 469782 - Valgrind does not support zstd-compressed debug sections
Mikhail Gorodetsky [Sun, 17 Nov 2024 20:14:17 +0000 (21:14 +0100)] 
Bug 469782 - Valgrind does not support zstd-compressed debug sections

8 months agodrd: Split handle_client_request()
Bart Van Assche [Mon, 18 Nov 2024 21:15:36 +0000 (13:15 -0800)] 
drd: Split handle_client_request()

Make handle_client_request() easier to read by splitting it into two
functions: one for Valgrind core client requests and one for thread-
related client requests.

8 months agodrd: Reorder functions
Bart Van Assche [Mon, 18 Nov 2024 21:08:29 +0000 (13:08 -0800)] 
drd: Reorder functions

Reorder two functions such that a forward declaration can be removed.