]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
17 months agoUpdate README_PACKAGERS
Paul Floyd [Thu, 15 Feb 2024 19:48:07 +0000 (20:48 +0100)] 
Update README_PACKAGERS

Give another example of why stripping the binaries is a bad idea.

17 months agoFreeBSD: add suppressions for reachable memory in libthr.so
Paul Floyd [Thu, 15 Feb 2024 19:35:03 +0000 (20:35 +0100)] 
FreeBSD: add suppressions for reachable memory in libthr.so

17 months agoFix gdbserver tests failing due to 'warning: ' prefix in syscall-template.S line
Philippe Waroquiers [Sun, 11 Feb 2024 15:14:54 +0000 (16:14 +0100)] 
Fix gdbserver tests failing due to 'warning: ' prefix in syscall-template.S line

At least on debina 12.5, with GDB 13.1 and GDB 14.1, 2 gdbserver tests
fails due to a 'warning: ' word appearing in from of a line
giving the syscall-template.S filename.

Fix this by allowing an optional 'warning: ' regexp at the beginning of the line.

Tested on debian 12.5, with GDB 12.1/13.1/14.1 and 15.0.50.20240211-git

17 months agoFreeBSD regtest: improve memcheck filtering for varinfo5
Paul Floyd [Sat, 10 Feb 2024 10:29:09 +0000 (11:29 +0100)] 
FreeBSD regtest: improve memcheck filtering for varinfo5

Now only one real difference between clang and GCC.

17 months agoFreeBSD regtest: updates for memcheck varinfo5
Paul Floyd [Sat, 10 Feb 2024 08:08:16 +0000 (09:08 +0100)] 
FreeBSD regtest: updates for memcheck varinfo5

Two things:
Improvement in reading debuginfo for variables.
clang16 doing tail call optimization, so add -fno-optimize-sibling-calls

17 months agoBug 471036 - Add test for rorx with rip-relative address
Matthias Schwarzott [Fri, 9 Feb 2024 07:04:51 +0000 (08:04 +0100)] 
Bug 471036 - Add test for rorx with rip-relative address

17 months agoBug 471036 - Print more context for amd64 disasm rip mismatch
Matthias Schwarzott [Fri, 9 Feb 2024 07:22:58 +0000 (08:22 +0100)] 
Bug 471036 - Print more context for amd64 disasm rip mismatch

17 months agoBug 471036 - disInstr_AMD64: disInstr miscalculated next %rip on RORX imm8, m32/64...
Paul Floyd [Sat, 10 Feb 2024 07:19:20 +0000 (08:19 +0100)] 
Bug 471036 - disInstr_AMD64: disInstr miscalculated next %rip on RORX imm8, m32/64, r32/6

Patch contributed by redoste@redoste.xyz

17 months agoNEWS: add bug 481131
Paul Floyd [Fri, 9 Feb 2024 20:58:07 +0000 (21:58 +0100)] 
NEWS: add bug 481131

17 months agox86 regtest: fix clobber lists in generated asm statements
Gra??vydas Ignotas [Fri, 9 Feb 2024 17:02:23 +0000 (19:02 +0200)] 
x86 regtest: fix clobber lists in generated asm statements

Must add result registers also, or else code like this is generated:

      asm(
         "fsave %3\n"
         "movl %2, %%eax\n"
         "cdq\n"
         "movl %%edx, %0\n"
         "movl %%eax, %1\n"
         "frstor %3\n"
         "cld\n"
         : "=m" (result0), "=m" (result1)
         : "m" (preset0), "m" (state[0])
         : "eax"
      );

This crashes on my machine because gcc places some pointer in %%edx.

17 months agomanpage: a few changes for realloc size zero and give FreeBSD a few mentions
Paul Floyd [Fri, 9 Feb 2024 20:55:21 +0000 (21:55 +0100)] 
manpage: a few changes for realloc size zero and give FreeBSD a few mentions

17 months agocommand line help: move --realloc-zero-bytes-frees
Paul Floyd [Fri, 9 Feb 2024 20:20:40 +0000 (21:20 +0100)] 
command line help: move --realloc-zero-bytes-frees

It should be in the section on tools that replace malloc.

17 months agolinux arm regtest: update neon64 expected
Paul Floyd [Thu, 8 Feb 2024 20:53:44 +0000 (21:53 +0100)] 
linux arm regtest: update neon64 expected

I get the same output from both Valgrind and running the test
natively.

17 months agoBug 283429 - ARM leak checking needs CLEAR_CALLER_SAVED_REGS
Paul Floyd [Thu, 8 Feb 2024 13:09:15 +0000 (14:09 +0100)] 
Bug 283429 - ARM leak checking needs CLEAR_CALLER_SAVED_REGS

Unfortunately it took over 12 years to reinvent the wheel and
fix this item.

See also
d91042c29dd3fbe2971f36f35b08e9735327f50a
and
b0015f7572bf42ee4ac1296884f5e7640ec1e5dc

17 months agoFreeBSD _umtx_op: fix bad wrapper for robust lists
Paul Floyd [Thu, 8 Feb 2024 07:34:42 +0000 (08:34 +0100)] 
FreeBSD _umtx_op: fix bad wrapper for robust lists

Was a half-baked copy and paste from the mutex version.

17 months agoAdd missing gitignore for none arm64 ldxp_stxp
Paul Floyd [Thu, 8 Feb 2024 06:15:22 +0000 (07:15 +0100)] 
Add missing gitignore for none arm64 ldxp_stxp

17 months agoTypo in comment
Paul Floyd [Wed, 7 Feb 2024 20:18:51 +0000 (21:18 +0100)] 
Typo in comment

17 months agoAdd myself to AUTHORS
Paul Floyd [Wed, 7 Feb 2024 20:11:53 +0000 (21:11 +0100)] 
Add myself to AUTHORS

17 months agolinux aarch64: an extra Helgrind printf suppression and dix a couple of warnings
Paul Floyd [Wed, 7 Feb 2024 20:06:52 +0000 (21:06 +0100)] 
linux aarch64: an extra Helgrind printf suppression and dix a couple of warnings

The existing suppression begins with

   fun:memcpy*

but I'm seeing the first one as

   fun:__GI_memcpy

so I just made that *memcpy*

17 months agolinux regtest: add prereq for bug480706
Paul Floyd [Wed, 7 Feb 2024 12:54:34 +0000 (13:54 +0100)] 
linux regtest: add prereq for bug480706

For systems without openssl

17 months agoFreeBSD regtest: feature test for aio_readv
Paul Floyd [Tue, 6 Feb 2024 14:53:36 +0000 (15:53 +0100)] 
FreeBSD regtest: feature test for aio_readv

Doesn't exist on FreeBSD 12.4 and earlier.
Also clean up configure output - was missing a few yes/nos.

17 months agoLinux regtest: link for bug480706
Paul Floyd [Tue, 6 Feb 2024 14:17:23 +0000 (15:17 +0100)] 
Linux regtest: link for bug480706

Needed to use LDADD not LDFLAGS

17 months agoLinux PPC32: fix typo
Paul Floyd [Tue, 6 Feb 2024 13:33:49 +0000 (14:33 +0100)] 
Linux PPC32: fix typo

Full stop instead of a comma.

17 months agoBug 480706 - Unhandled syscall 325 (mlock2)
Paul Floyd [Mon, 5 Feb 2024 21:14:33 +0000 (22:14 +0100)] 
Bug 480706 - Unhandled syscall 325 (mlock2)

18 months agoFreeBSD: updates for FreeBSD 14.0
Paul Floyd [Mon, 5 Feb 2024 12:21:28 +0000 (13:21 +0100)] 
FreeBSD: updates for FreeBSD 14.0

Added some filtering. Removed a few compiler warnings.
memcheck manuel1 has an extra error somewhere within
the printf calltree - sensitive to libc changes.

I still get
== 853 tests, 2 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/descr_belowsp             (stderr)
memcheck/tests/varinfo5                  (stderr)

descr_belowsp no longer mentions the guard page. Back in commit

121374b287ce39ef0e42e45dfc27ae0949e6f528

I said about FreeBSD 14 adding ASLR

"    Some more work will be needed for the stack size."

Looks like that has now come home to roost.

varinfo5 has lost some inline info but gained info on variable names.

18 months agoBug 476331 - clean up generated/distributed filter scripts
Paul Floyd [Fri, 2 Feb 2024 21:27:25 +0000 (22:27 +0100)] 
Bug 476331 - clean up generated/distributed filter scripts

18 months agoMakefiles: bug 476331 cleanup
Paul Floyd [Fri, 2 Feb 2024 20:17:49 +0000 (21:17 +0100)] 
Makefiles: bug 476331 cleanup

Quick test with one script to see if buildbot is happy.

18 months agoregtest: some missing AM_CFLAGS and AM_CXXFLAGS
Paul Floyd [Thu, 1 Feb 2024 12:55:59 +0000 (13:55 +0100)] 
regtest: some missing AM_CFLAGS and AM_CXXFLAGS

In all cases, these caused problems for 32on64 builds.

In a few cases extra CFLAGS were needed but AM_CFLAGS not used.

And it seems as though autoconf needs explicit else branches. So

if FOO
test_CFLAGS = ${AM_CFLAGS} -hide-some-warnings
endif

doesn't set test_CFLAGS to the default when FOO is false.
(I'm sure I've seen that before, and forgotten).

18 months agoLinux PPC: fix the constant used for O_DIRECT
Paul Floyd [Wed, 31 Jan 2024 06:48:52 +0000 (07:48 +0100)] 
Linux PPC: fix the constant used for O_DIRECT

There are two defined

$ grep -rI O_DIRECT /usr/include/* | grep -v ORY | grep -v __
/usr/include/asm/fcntl.h:#define O_DIRECT       0400000 /* direct disk access hint */
/usr/include/asm-generic/fcntl.h:#define O_DIRECT       00040000        /* direct disk access hint */

and of course I used the wrong one. The non-generic value is the right one.

18 months agoBug 480405 - valgrind 3.22.0 "m_debuginfo/image.c:586 (set_CEnt): Assertion '!sr_isEr...
Paul Floyd [Tue, 30 Jan 2024 21:02:21 +0000 (22:02 +0100)] 
Bug 480405 - valgrind 3.22.0 "m_debuginfo/image.c:586 (set_CEnt): Assertion '!sr_isError(sr)' failed."

18 months agoBug 480488 - Add support for FreeBSD 13.3
Paul Floyd [Tue, 30 Jan 2024 20:23:48 +0000 (21:23 +0100)] 
Bug 480488 - Add support for FreeBSD 13.3

18 months agoFreeBSD ioctl: add handling for FIODGNAME
Paul Floyd [Mon, 29 Jan 2024 07:03:52 +0000 (08:03 +0100)] 
FreeBSD ioctl: add handling for FIODGNAME

Up til now FreeBSD ioctl coverage was conspicuous by its absence
relying entirely on the generic wrapper. Time to start improving
that.

Example provided by Kyle Evans.

18 months agoRevert compiler flags for armv7
Paul Floyd [Sun, 28 Jan 2024 20:04:08 +0000 (21:04 +0100)] 
Revert compiler flags for armv7

18 months agoARM: handle v6 to v8 in configure.ac
Paul Floyd [Sun, 28 Jan 2024 14:34:27 +0000 (15:34 +0100)] 
ARM: handle v6 to v8 in configure.ac

Some changes based on first patch in
https://bugs.kde.org/show_bug.cgi?id=276897
Bug 276897 ARM v6 legacy patches
contributed by "JW"

I've also modified the GCC flags for a few tests in none/tests/arm

We probably need more arm feature tests in configure.ac.

18 months agoDRD regtest: add ARM expecteds for annotate_trace_memory
Paul Floyd [Sun, 28 Jan 2024 09:09:41 +0000 (10:09 +0100)] 
DRD regtest: add ARM expecteds for annotate_trace_memory

The diff is that one 8byte access is being split into two 4byte
acceses.

18 months agoFreeBSD regtest: make memcheck varinfo3 filtering consistent
Paul Floyd [Sun, 28 Jan 2024 08:47:36 +0000 (09:47 +0100)] 
FreeBSD regtest: make memcheck varinfo3 filtering consistent

Same formar for static_local_def

18 months agomemcheck regtest arm: add a clobber to r0
Paul Floyd [Sun, 28 Jan 2024 08:23:18 +0000 (09:23 +0100)] 
memcheck regtest arm: add a clobber to r0

This fixes a few of the leak testcases

18 months agoregtest gdbserver: add an extra filter for Raspberry Pi OS select
Paul Floyd [Sat, 27 Jan 2024 16:07:30 +0000 (17:07 +0100)] 
regtest gdbserver: add an extra filter for Raspberry Pi OS select

18 months agoHelgrind: add suppression for libnss from getaddrinfo
Paul Floyd [Sat, 27 Jan 2024 07:00:34 +0000 (08:00 +0100)] 
Helgrind: add suppression for libnss from getaddrinfo

Seems as though Raspberry Pi OS doesn't have a debuginfo package
for libnss_mdns4 so we need to suppress based on the obj name.

There is still one error in the Helgrind getaddrinfo test, but that
is in the somewhat malformed libarmmem library (which does have
debuginfo but Valgrind can't read it because there is no ELF type
or size info). I think that suppressing that would be too broad.

18 months agogdbserver_tests/filter_gdb.in: delete thread exiting
Mark Wielaard [Mon, 22 Jan 2024 13:08:30 +0000 (14:08 +0100)] 
gdbserver_tests/filter_gdb.in: delete thread exiting

The hginfo testcase would fail with GDB 14.1 because it would output
an extra line saying: [Thread .... exited]

18 months agoBug 480126 - Build failure on Raspberry Pi 5 / OS 6.1.0-rpi7-rpi-v8
Paul Floyd [Sun, 21 Jan 2024 20:33:06 +0000 (21:33 +0100)] 
Bug 480126 - Build failure on Raspberry Pi 5 / OS 6.1.0-rpi7-rpi-v8

The problem is that the Pi 3+ with raspbian has a 64bit aarch64 OS
but a 32bit gnueabihf userland. If you just run "configure" the
result will be an attempt to use 32-bit GCC with the ARM64 Valgrind
platform, which will fail.

This can be fixed by using the appropriate --host= option.
I've updated README.aarch64 with a description of this.

I've also changed configure.ac to take "arm*" for the
ARM platform (previously it was "armv7*"). That's been
a patch on Debian for a while. It will allow building
on older arm hardware and also armv8 (used on the
Raspberry Pi 3 and later models).

18 months agoBug 480052 - WARNING: unhandled amd64-freebsd syscall: 580
Paul Floyd [Sat, 20 Jan 2024 20:14:37 +0000 (21:14 +0100)] 
Bug 480052 - WARNING: unhandled amd64-freebsd syscall: 580

18 months agoFreeBSD: revert a change for debugging ifunctions and correct a couple of typos
Paul Floyd [Sat, 20 Jan 2024 17:53:01 +0000 (18:53 +0100)] 
FreeBSD: revert a change for debugging ifunctions and correct a couple of typos

19 months agoregtest: try to make cachegrind/tests/ann-merge2.vgtest deterministic
Paul Floyd [Thu, 28 Dec 2023 20:50:06 +0000 (21:50 +0100)] 
regtest: try to make cachegrind/tests/ann-merge2.vgtest deterministic

Add a touch of the cgout files so that they are more recent than the
source file. git clone seems to sometimes timestamp the source
after the cgout files which generates a warning and a post failure.
At least with FreeBSD on ZFS.

19 months agoFix unused variable warning
Paul Floyd [Thu, 28 Dec 2023 11:08:40 +0000 (12:08 +0100)] 
Fix unused variable warning

19 months agoDarwin: Fix another bad merge of coregrind/m_debuginfo/debuginfo.c
Paul Floyd [Thu, 28 Dec 2023 09:47:29 +0000 (10:47 +0100)] 
Darwin: Fix another bad merge of coregrind/m_debuginfo/debuginfo.c

19 months agoDarwin: Fix bad merge of coregrind/m_debuginfo/debuginfo.c
Paul Floyd [Thu, 28 Dec 2023 09:41:54 +0000 (10:41 +0100)] 
Darwin: Fix bad merge of coregrind/m_debuginfo/debuginfo.c

19 months agoAdd Bug 479041 to NEWS
Paul Floyd [Thu, 28 Dec 2023 09:35:52 +0000 (10:35 +0100)] 
Add Bug 479041 to NEWS

19 months agoBug 479041 - Executables without RW sections do not trigger debuginfo reading
Paul Floyd [Thu, 28 Dec 2023 09:27:18 +0000 (10:27 +0100)] 
Bug 479041 - Executables without RW sections do not trigger debuginfo reading

The main change is to not assume that there is always 1 and only 1 RW segment.
Now the rw segment count is obtained from the macho segments.

I've had to make several changes to remove asserts that checked
that there is always 1 or more rw segments. I don't think that this
really affects 'normal' C and C++ compiled binaries. There is one
exp-bbv testcase (x86/million) that is written in assembler and
was failing until I removed all of the asserts.

There's still a bit more work to do.
1. Handle fat binaries - are these still a thing (with "apple silicon")?
2. Use a dynamically sized buffer for the segments rather than just 4k.

19 months agoIllumos regtest: memmem testacase update
Paul Floyd [Tue, 26 Dec 2023 18:02:19 +0000 (19:02 +0100)] 
Illumos regtest: memmem testacase update

Like Darwin, Illumos memmem returns NULL if either length is 0.

19 months agoDarwin regtest: modify filter for massif
Paul Floyd [Tue, 26 Dec 2023 09:01:15 +0000 (10:01 +0100)] 
Darwin regtest: modify filter for massif

Now only have 3 failing testcases with 2 causes
- brk() not handled
- not redirecting alloc functions in the main exe

19 months agoDarwin massif: add lots of ignore-fn for the many dynamic allocations done at startup
Paul Floyd [Tue, 26 Dec 2023 08:42:56 +0000 (09:42 +0100)] 
Darwin massif: add lots of ignore-fn for the many dynamic allocations done at startup

19 months agomips: add missing header for nanomips
Petar Jovanovic [Mon, 25 Dec 2023 10:41:02 +0000 (10:41 +0000)] 
mips: add missing header for nanomips

Add the missing header and fix nanomips build of Valgrind.

19 months agoDarwin regtest: try again with memmem and make sigreturn warnings debug level 1
Paul Floyd [Mon, 25 Dec 2023 08:04:46 +0000 (09:04 +0100)] 
Darwin regtest: try again with memmem and make sigreturn warnings debug level 1

19 months agoDarwin regtest: memmem returns NULL if either length is 0.
Paul Floyd [Mon, 25 Dec 2023 08:00:26 +0000 (09:00 +0100)] 
Darwin regtest: memmem returns NULL if either length is 0.

19 months agoFreeBSD regtest: broaden unknown suppression
Paul Floyd [Sun, 24 Dec 2023 16:56:00 +0000 (17:56 +0100)] 
FreeBSD regtest: broaden unknown suppression

Also add comment about recently obsoleted syscalls

19 months agoFreeBSD regtest: ensure aio_read string is null terminated
Paul Floyd [Sun, 24 Dec 2023 16:37:50 +0000 (17:37 +0100)] 
FreeBSD regtest: ensure aio_read string is null terminated

Was failing on FreeBSD 14 x86

19 months agolinux regtest: remove alloc-size-larger-than warning for reallocarray
Paul Floyd [Fri, 22 Dec 2023 20:16:19 +0000 (21:16 +0100)] 
linux regtest: remove alloc-size-larger-than warning for reallocarray

19 months agolinux regtest: turn off stringop-overflow warning for strlcat_strlcpy
Paul Floyd [Fri, 22 Dec 2023 19:35:33 +0000 (20:35 +0100)] 
linux regtest: turn off stringop-overflow  warning for strlcat_strlcpy

19 months agoSkip updating rodata avma and tracing when there are non-contiguous rodata sections.
Paul Floyd [Fri, 22 Dec 2023 19:16:04 +0000 (20:16 +0100)] 
Skip updating rodata avma and tracing when there are non-contiguous rodata sections.

19 months agoBug 478837 - valgrind fails to read debug info for rust binaries
Paul Floyd [Fri, 22 Dec 2023 18:59:56 +0000 (19:59 +0100)] 
Bug 478837 - valgrind fails to read debug info for rust binaries

mold produces binaries with non-contiguous .rodata and .rodata.xxx
sections. The code that merges their addresses can only handle 1
rodata which means only contiguous sections can be merged.

Since this now seems to be a "normal" case I've changed the warning
message to be a SYMTAB_TRACE message.

19 months agoBug 478624 - Valgrind incompatibility with binutils-2.42 on x86 with new nop patterns...
Paul Floyd [Sun, 17 Dec 2023 13:18:51 +0000 (14:18 +0100)] 
Bug 478624 - Valgrind incompatibility with binutils-2.42 on x86 with new nop patterns (unhandled instruction bytes: 0x2E 0x8D 0xB4 0x26)

It was a bit of a struggle to get the testcase to build
with both clang and gcc (oddly enough gcc was more difficult) so
I just resorted to using .byte arrays.

19 months agoLinux: broaden one of the dynamic thread vector reachable suppressions
Paul Floyd [Tue, 12 Dec 2023 17:22:58 +0000 (17:22 +0000)] 
Linux: broaden one of the dynamic thread vector reachable suppressions

On Arch Linux the callstack has two calls to malloc whilst the old
suppression only had one.

19 months agoFreeBSD: another reachable suppression, for getgrnam this time
Paul Floyd [Tue, 12 Dec 2023 17:01:53 +0000 (18:01 +0100)] 
FreeBSD: another reachable suppression, for getgrnam this time

19 months agoFreeBSD: add suppressions for still reachable memory when using getaddrinfo
Paul Floyd [Tue, 12 Dec 2023 16:41:38 +0000 (17:41 +0100)] 
FreeBSD: add suppressions for still reachable memory when using getaddrinfo

Also add a couple of attributions for my recent memccpy changes.

19 months agoAdd a redir for memccpy
Paul Floyd [Sat, 9 Dec 2023 19:54:53 +0000 (20:54 +0100)] 
Add a redir for memccpy

19 months agoAdd bug 478211 to NEWS
Mark Wielaard [Fri, 8 Dec 2023 13:32:48 +0000 (14:32 +0100)] 
Add bug 478211 to NEWS

Commit ec73dcb18 remote-utils-shared: Created files for sharing code

19 months agoremote-utils-shared: Created files for sharing code
Alexandra Petlanova Hajkova [Wed, 6 Dec 2023 08:14:53 +0000 (03:14 -0500)] 
remote-utils-shared: Created files for sharing code

between vgdb.c and m_gdbserver/server.c. This removes code
redundancies that was introduced for vgdb.c by vgdb --multi
implementation.

20 months agocoverity: mostly deadcode warnings that depend on platform macros
Paul Floyd [Mon, 4 Dec 2023 08:16:37 +0000 (09:16 +0100)] 
coverity: mostly deadcode warnings that depend on platform macros

So just turn them off

20 months agoAdd fchmodat2 syscall on linux
Mark Wielaard [Sat, 18 Nov 2023 20:17:02 +0000 (21:17 +0100)] 
Add fchmodat2 syscall on linux

fchmodat2 is a new syscall on linux 6.6. It is a variant of fchmodat
that takes an extra flags argument.

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

20 months agovgdb.c: Encode the qRcmd reply as hex string
Alexandra Petlanova Hajkova [Wed, 29 Nov 2023 10:40:13 +0000 (05:40 -0500)] 
vgdb.c: Encode the qRcmd reply as hex string

When vgdb replies to qRcmd packet recieved from GDB, it
used to send the reply as simple string. This is wrong,
GDB expects to get a hex encoded string.

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

20 months agocoverity: deadcode and unsigned comparison with 0 warnings
Paul Floyd [Tue, 28 Nov 2023 08:03:22 +0000 (09:03 +0100)] 
coverity: deadcode and unsigned comparison with 0 warnings

20 months ago(really) Bug 477630 - Include ucontext.h rather than sys/ucontext.h in Solaris sources
Paul Floyd [Tue, 28 Nov 2023 07:33:08 +0000 (08:33 +0100)] 
(really) Bug 477630 - Include ucontext.h rather than sys/ucontext.h in Solaris sources

Mixed up my patches and the previous commit should have been
Bug 477628 - Add mremap support for Solaris

Patch provided by
   Jakub Kulik kulikjak@gmail.com

20 months agoBug 477630 - Include ucontext.h rather than sys/ucontext.h in Solaris sources
Paul Floyd [Tue, 28 Nov 2023 07:00:19 +0000 (08:00 +0100)] 
Bug 477630 - Include ucontext.h rather than sys/ucontext.h in Solaris sources

Patch provided by
   Jakub Kulik kulikjak@gmail.com

20 months agocoverity: a few more unsigned comparisons and unused return values
Paul Floyd [Mon, 27 Nov 2023 08:52:06 +0000 (09:52 +0100)] 
coverity: a few more unsigned comparisons and unused return values

20 months agolauncher-linux.c (find_client): barf if we don't have read permission for executable
Mark Wielaard [Sun, 26 Nov 2023 17:22:01 +0000 (18:22 +0100)] 
launcher-linux.c (find_client): barf if we don't have read permission for executable

For such an executable valgrind will now report:

valgrind: Cannot continue: Need read permission on /usr/local/bin/exec-no-read

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

20 months agoDarwin: clean up 3 warnings
Paul Floyd [Sun, 26 Nov 2023 12:52:32 +0000 (13:52 +0100)] 
Darwin: clean up 3 warnings

20 months agoFreeBSD regtest: make aio test more robust
Paul Floyd [Sun, 26 Nov 2023 09:23:34 +0000 (10:23 +0100)] 
FreeBSD regtest: make aio test more robust

Had to remove a few of the errors - seems to me that aio errors
are not handled well by the FreeBSD kernel. E.g., it looks
like the error state doesn't get cleared by aio_return.

20 months agoFreeBSD regtest: new aio test sometimes hangs in infinite aio_error loop
Paul Floyd [Thu, 23 Nov 2023 06:45:09 +0000 (07:45 +0100)] 
FreeBSD regtest: new aio test sometimes hangs in infinite aio_error loop

Put a limit on the loop. Need to check if this is not a problem with
aio_read corrupting memory.

20 months agoDarwin: add sigwait syscall wrapper
Paul Floyd [Thu, 23 Nov 2023 06:24:11 +0000 (07:24 +0100)] 
Darwin: add sigwait syscall wrapper

The FreeBSD testcase doesn't work, but the problem seems
to be with the initial signal()/raise(). Needs more work.

20 months agocoverity: unsigned comparisons with 0
Paul Floyd [Wed, 22 Nov 2023 20:22:18 +0000 (21:22 +0100)] 
coverity: unsigned comparisons with 0

20 months agoFreeBSD: wrong level of indirection and unsigned >= 0 comparison
Paul Floyd [Wed, 22 Nov 2023 08:08:30 +0000 (09:08 +0100)] 
FreeBSD: wrong level of indirection and unsigned >= 0 comparison

20 months agocoverity: unreachable and unused
Paul Floyd [Wed, 22 Nov 2023 07:19:47 +0000 (08:19 +0100)] 
coverity: unreachable and unused

20 months agoarm64: remove a couple of lines of dead code
Paul Floyd [Tue, 21 Nov 2023 21:05:40 +0000 (22:05 +0100)] 
arm64: remove a couple of lines of dead code

20 months agompi: remove NULL checks before frees
Paul Floyd [Tue, 21 Nov 2023 20:58:36 +0000 (21:58 +0100)] 
mpi: remove NULL checks before frees

As Coverity points out, paths reaching these NULL checks will
have already dereferenced the pointers. So use the same condition
as for the allocation.

20 months agoDarwin: another csrctl change
Paul Floyd [Mon, 20 Nov 2023 21:28:43 +0000 (22:28 +0100)] 
Darwin: another csrctl change

Still getting asserts on x86 probably due to 64 bit arguments
(none of the Darwin syscalls are split into x86 / amd64 with
MERGEs for x86).

20 months agoDarwin: missing defines to go with previous change
Paul Floyd [Mon, 20 Nov 2023 20:42:01 +0000 (21:42 +0100)] 
Darwin: missing defines to go with previous change

20 months agoDarwin: try to fix csrctl syscall wrapper
Paul Floyd [Mon, 20 Nov 2023 20:37:10 +0000 (21:37 +0100)] 
Darwin: try to fix csrctl syscall wrapper

memcheck/tests/x86/xor-undef fails with
+valgrind: m_syswrap/syswrap-darwin.c:9810 (void vgSysWrap_darwin_csrctl_before(ThreadId, SyscallArgLayout *, SyscallArgs *, SyscallStatus *, UWord *)): Assertion 'sizeof(user_addr_t) <= sizeof(RegWord)' failed.
(on macOS 10.13)

Change copied from
   https://github.com/LouisBrunner/valgrind-macos

20 months agoDarwin regtest: add testcase for bug390269
Paul Floyd [Mon, 20 Nov 2023 12:52:30 +0000 (13:52 +0100)] 
Darwin regtest: add testcase for bug390269

20 months agoDarwin: openat(_nocancel) fixes
Paul Floyd [Mon, 20 Nov 2023 12:31:37 +0000 (13:31 +0100)] 
Darwin: openat(_nocancel) fixes

One wrong warning string and missing macro declarations

20 months agoDarwin: add suppressions for a couple of crypto functions
Paul Floyd [Mon, 20 Nov 2023 12:19:08 +0000 (13:19 +0100)] 
Darwin: add suppressions for a couple of crypto functions

20 months agoDarwin: add missing define for VKI_AT_FDCWD
Paul Floyd [Mon, 20 Nov 2023 12:18:22 +0000 (13:18 +0100)] 
Darwin: add missing define for VKI_AT_FDCWD

20 months agoBug 390269 - unhandled amd64-darwin syscall: unix:464 (openat_nocancel)
Paul Floyd [Mon, 20 Nov 2023 11:59:12 +0000 (12:59 +0100)] 
Bug 390269 - unhandled amd64-darwin syscall: unix:464 (openat_nocancel)

Copied from https://github.com/LouisBrunner/valgrind-macos.git

Regtest to come shortly

20 months agoBug 428364 - Signals inside io_uring_enter not handled
Paul Floyd [Sat, 18 Nov 2023 12:02:30 +0000 (13:02 +0100)] 
Bug 428364 - Signals inside io_uring_enter not handled

Patch provide by
    Andrew Soutar kdebugtraq@andrewsoutar.com
Thanks!

I haven't added the reproducers as they require interrupting
the Valgrind process. Maybe the tests can be adapted to use
fork and have the parent kill the child running io_uring.

20 months agolinux helgrind: broaden __printf_buffer_write suppression
Paul Floyd [Sat, 18 Nov 2023 10:34:09 +0000 (11:34 +0100)] 
linux helgrind: broaden __printf_buffer_write suppression

On Fedora 39 pth_mempcpy_false_races was failing because
the callstack now has an extra inline and memcpy is versioned

20 months agoBug 466884 - Missing writev uninit padding suppression for _XSend
Paul Floyd [Sat, 18 Nov 2023 08:38:25 +0000 (09:38 +0100)] 
Bug 466884 - Missing writev uninit padding suppression for _XSend

20 months agoBug 476548 - valgrind 3.22.0 fails on assertion when loading debuginfo file produced...
Paul Floyd [Sat, 18 Nov 2023 07:49:34 +0000 (08:49 +0100)] 
Bug 476548 - valgrind 3.22.0 fails on assertion when loading debuginfo file produced by mold

20 months agoFreeBSD: make warnings about casting away volatile go away
Paul Floyd [Sat, 18 Nov 2023 07:30:56 +0000 (08:30 +0100)] 
FreeBSD: make warnings about casting away volatile go away

20 months agofreebsd: unused variable warning
Paul Floyd [Sat, 18 Nov 2023 07:23:08 +0000 (08:23 +0100)] 
freebsd: unused variable warning

still not sure what to do in aio_cancel

20 months agodarwin: syswrap-darwin.c warning cleanup
Paul Floyd [Sat, 18 Nov 2023 07:21:52 +0000 (08:21 +0100)] 
darwin: syswrap-darwin.c warning cleanup