]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
2 months agoDRD regtest: delete second line in callstack of std_thread2 test
Paul Floyd [Sat, 7 Feb 2026 10:02:38 +0000 (11:02 +0100)] 
DRD regtest: delete second line in callstack of std_thread2 test

Older GCCs generate something quite different. No point trying to
massage it into something common so just delete it.

2 months agoregtest: broaden a suppression used in memcheck/tests/leak_cpp_interior
Paul Floyd [Sat, 7 Feb 2026 09:02:10 +0000 (10:02 +0100)] 
regtest: broaden a suppression used in memcheck/tests/leak_cpp_interior

The test should now pass on PPC machines.

2 months agoillumos warnings: malinfo struct fields are 64bit on illumos
Paul Floyd [Fri, 6 Feb 2026 16:46:33 +0000 (17:46 +0100)] 
illumos warnings: malinfo struct fields are 64bit on illumos

2 months agoSanity check VG_(realpath) and VG_(readlink) return values
Mark Wielaard [Fri, 6 Feb 2026 12:57:24 +0000 (13:57 +0100)] 
Sanity check VG_(realpath) and VG_(readlink) return values

When VG_(realpath) calls VG_(readlink) it failed to check if
VG_(readlink) succeeds, possibly writing to tmp[-1] (on the stack). It
also didn't check the getcwd syscall succeeded, which would cause the
resolved name to start with undefined bits (from the stack).

VG_(data_size) was using too small a (stack) buffer for the
VG_(realpath) call and didn't check whether the call actually
succeeded.

At startup initimg-{darwin,freebsd,linux,solaris} also didn't check
VG_(realpath) would resolve before setting VG_(resolved_exename) to
possibly random bits on the stack. Fix that by using the (unresolved)
exe_name in those cases.

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

2 months agoDRD regtest: one more test case with --num-callers=1
Paul Floyd [Fri, 6 Feb 2026 12:10:19 +0000 (13:10 +0100)] 
DRD regtest: one more test case with --num-callers=1

2 months agoillumos regtest: another assignment in assert for errno
Paul Floyd [Fri, 6 Feb 2026 09:20:01 +0000 (10:20 +0100)] 
illumos regtest: another assignment in assert for errno

2 months agoilumos regtest: update one test that uses --num-callers=1
Paul Floyd [Fri, 6 Feb 2026 07:40:47 +0000 (08:40 +0100)] 
ilumos regtest: update one test that uses --num-callers=1

2 months agoBug 515183 - Error occurred while executing the command `valgrind --num-callers=1...
Paul Floyd [Thu, 5 Feb 2026 19:41:07 +0000 (20:41 +0100)] 
Bug 515183 - Error occurred while executing the command `valgrind --num-callers=1 ./hello_world`

2 months agoFreeBSD regtest: incorrect use of = rather then == in asserts
Paul Floyd [Thu, 5 Feb 2026 18:55:34 +0000 (19:55 +0100)] 
FreeBSD regtest: incorrect use of = rather then == in asserts

2 months agos390: disasm-test: use s390_disasm
Florian Krohm [Thu, 5 Feb 2026 18:03:05 +0000 (18:03 +0000)] 
s390: disasm-test: use s390_disasm

No need to capture the disassembled insn from a tracing side effect.
Call s390_disasm directly with mnemonic-padding disabled.

2 months agos390: Change s390_disasm and tweak specification exception message
Florian Krohm [Thu, 5 Feb 2026 17:39:49 +0000 (17:39 +0000)] 
s390: Change s390_disasm and tweak specification exception message

s390_disasm now returns a pointer to the disassembled insn string or NULL.
A new parameter controls whether the mnemonic should be padded with blanks
to the max. insn length.

When reporting a specification exception also write out the disassembled insn.

2 months agos390: Fix s390_irgen_VGE[FG] and s390_irgen_VSCE[FG]
Florian Krohm [Wed, 4 Feb 2026 22:34:30 +0000 (22:34 +0000)] 
s390: Fix s390_irgen_VGE[FG] and s390_irgen_VSCE[FG]

Instead of creating a specification exception these run into an assertion:

VEX: s390_vr_offset_by_index: invalid index for given type

There are proper s390_insn_assert in s390_irgen_VGEF etc. However, the
vassert happens in s390_format_VRV --> get_vr --> s390_vr_offset_by_index
prior to s390_irgen_... being called.
Fixed by adding s390_insn_assert to s390_format_VRV.

Found by disasm-test.

2 months agos390: Fix s390_irgen_VSTEF
Florian Krohm [Wed, 4 Feb 2026 20:51:48 +0000 (20:51 +0000)] 
s390: Fix s390_irgen_VSTEF

Fix the s390_insn_assert. There are 4, not 8, word-sized elements in a
vector register.

Found by disasm-test.

2 months agos390: Fix s390_irgen_SRNMB
Florian Krohm [Wed, 4 Feb 2026 20:36:09 +0000 (20:36 +0000)] 
s390: Fix s390_irgen_SRNMB

When B2 is 0 the least significant 8 bits in D2 must designate a valid
rounding mode. Bits D2[0:55] are ignored. Mask D2 accordingly.

Found by disasm-test.

2 months agos390: Fix s390_irgen_VMSL
Florian Krohm [Wed, 4 Feb 2026 20:16:03 +0000 (20:16 +0000)] 
s390: Fix s390_irgen_VMSL

The reserved bits in M3, when set, do not cause a specification exception.
However, disasm-test reports e.g:

error: Unexpected spec. exc. detected for E764 1310 92B8   vmslg %v6,%v4,%v17,%v9,1

Now fixed.

2 months agos390: Fix s390_irgen_VSTER
Florian Krohm [Wed, 4 Feb 2026 19:59:41 +0000 (19:59 +0000)] 
s390: Fix s390_irgen_VSTER

M3 == 4 is a reserved value and causes a specification exception.
However, disasm-test reports:

error: Spec. exc. not detected for E660 0000 400F   vster %v6,0,4

Now fixed.

2 months agos390: Fix s390_irgen_POPCNT
Florian Krohm [Wed, 4 Feb 2026 19:08:20 +0000 (19:08 +0000)] 
s390: Fix s390_irgen_POPCNT

The POPCNT insn does not cause a specification exception when reserved
bits in m3 are not zero.
Found by disasm-test.

2 months agoAdd BLENDPS and PBLENDW support for x86 32 bit
Alexandra Hájková [Fri, 30 Jan 2026 10:06:17 +0000 (05:06 -0500)] 
Add BLENDPS and PBLENDW support for x86 32 bit

Add decode_sse4_blend_imm which allows to reuse BLENDPD decoder code
for BLENDPS and PBLENDW. Moved math_BLENDPS_128, math_PBLENDW_128
and math_PBLENDVB_128 from VEX/priv/guest_amd64_toIR.c
to VEX/priv/guest_generic_sse.h to be able to reuse existing amd64 code
for x86 implementation.

Moved test_BLENDPS and test_PBLENDW from none/tests/amd64/sse4-64.c to
none/tests/sse4-common.h and updated the expected tests output to match
the new implementation. Removed vassert(0) in VEX/priv/host_x86_defs.c
in push_word_from_tags in order for test_PBLENDW to be able to pass.

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

2 months agos390: The 2nd coming of disasm-test
Florian Krohm [Wed, 4 Feb 2026 16:03:30 +0000 (16:03 +0000)] 
s390: The 2nd coming of disasm-test

With the advent of objdump-based disassembly there is no need anymore to
ensure that the disassembled insns out of valgrind match those from objdump.
This is now correct by construction.

In this patch the disasm-test functionality is changed to ensure that all
expected specification exceptions as specified in the Principles of
Operations are detected and no unexpected specification exceptions are found.

For a given opcode 2 sets of testcases will now be generated:
- one where every insn causes a specification exception
  This catches missed specification exceptions.
- one where no insn causes a specification exception
  This catches unexpected specification exceptions.

Changes:
Remove command line options --generate and --verify. Those were useful
in the early stages of development but not anymore.
Remove command line options --show-spec-exc and --no-show-miscompares
which are obsolete now.
Replace command line option --check-prereq with --check-march=ARCH.
Remove command line option --all-except-exrl. Add --exclude option which
is more general.
Add command line options --spec-exc and --no-spec-exc.
Remove functions check_objdump and disasm_same.
From verify_stats remove num_mismatch and num_verified members.
Rename verify_stats --> test_stats and add num_generated member.
Rename verify_disassembly --> verify_spec_exceptions.
No longer write .vex file. Write .spec-exc file instead.
Factor out functions run_opcode and choose_int_and_iterate.
New functions asm_detects_spec_exc and insn_bytes_as_string.

Opcode table in opcode.c:
- Remove all constraints that do not cause a specification exception.
- Change modelling of the "Rotate and ...." opcodes. Previously the
  i3, i4 and i5 fields are modelled as masks. That was a work-around in
  order to be able to specify interesting values and is no longer
  needed. Model those fields as integers instead.

Update disasm-test.vgtest.
Update README.
Copyright year updated.

2 months agoregtest: add -std=c++17 for memcheck xmas_tree
Paul Floyd [Wed, 4 Feb 2026 12:10:18 +0000 (13:10 +0100)] 
regtest: add -std=c++17 for memcheck xmas_tree

For middle-aged compilers that support C++17 but not by default.

2 months agoFix asserts in testcases close_range, bug514094 and readlinkat_self.
Mark Wielaard [Tue, 3 Feb 2026 18:28:46 +0000 (19:28 +0100)] 
Fix asserts in testcases close_range, bug514094 and readlinkat_self.

These tests did an assert (errno = EFAULT) instead of an assert on
errno == EFAULT. close_range was also using an valid flag 2
(CLOSE_RANGE_UNSHARE) instead of a bad one.

2 months agoMake configure.ac POSIX-friendly
Paul Floyd [Tue, 3 Feb 2026 12:56:24 +0000 (13:56 +0100)] 
Make configure.ac POSIX-friendly

Reported by Thomas Klausner

2 months agoRegtest: fix build for old compilers without aligned new/delete
Paul Floyd [Fri, 30 Jan 2026 20:21:57 +0000 (21:21 +0100)] 
Regtest: fix build for old compilers without aligned new/delete

2 months agoMore warning cleanup
Paul Floyd [Thu, 29 Jan 2026 19:32:05 +0000 (20:32 +0100)] 
More warning cleanup

Fix a cast from volatile that has been bothering me for a while.
Also a warning dur to some Darwin code that reuses a ULong
for a memory address. That causes a warning on 32bits because
pointers are 32bit but ULong is always 64bit.

2 months agoWarning cleanup
Paul Floyd [Thu, 29 Jan 2026 12:45:21 +0000 (13:45 +0100)] 
Warning cleanup

2 months agoBug 514613 again (closing </still_reachable> xml tag)
Paul Floyd [Wed, 28 Jan 2026 12:38:39 +0000 (13:38 +0100)] 
Bug 514613 again (closing </still_reachable> xml tag)

Always close the tag after the heuristic details.

Add 4 testcases, one with no errors, one with a simple leak,
one with a simple reachable and one "Xmas tree" test (in
reference to the TCP/IP Christmas tree packet
https://en.wikipedia.org/wiki/Christmas_tree_packet). That
has most of the errors that memcheck can produce.

All of these tests get checked by xmllint.

3 months agoBug 253436 - vex amd64->IR: unhandled instruction bytes: 0xF2 0xA6 (repne cmps)
Paul Floyd [Sat, 24 Jan 2026 07:20:29 +0000 (08:20 +0100)] 
Bug 253436 - vex amd64->IR: unhandled instruction bytes: 0xF2 0xA6 (repne cmps)

Patch submitted by jacobly.alt@gmail.com
Regtest update submitted by Lukas Dullinger <itislu.git@gmail.com>

3 months agos390: s390_format_VRI related changes
Florian Krohm [Thu, 22 Jan 2026 21:39:49 +0000 (21:39 +0000)] 
s390: s390_format_VRI related changes

Rename:
s390_format_VRI_V0UUU  --> s390_format_VRIb
s390_format_VRI_VVIMM  --> s390_format_VRIe
s390_format_VRId_VVVI  --> s390_format_VRId
s390_format_VRId_VVVIM --> s390_format_VRIdm
s390_format_VRI_VVIM   --> s390_format_VRIc
s390_format_VRI_VIM    --> s390_format_VRIa
s390_format_VRI_V0U    --> s390_format_VRIa0

Remove s390_format_VRI_V0IU (same as s390_format_VRI_VIM).

3 months agos390: Rename s390_format_VRS_VRRD[M]
Florian Krohm [Thu, 22 Jan 2026 20:39:48 +0000 (20:39 +0000)] 
s390: Rename s390_format_VRS_VRRD[M]

s390_format_VRS_VRRD  -->  s390_format_VRSb
s390_format_VRS_VRRDM -->  s390_format_VRSbm

Add missing VRSb_... field access macros.

3 months agos390: Rename s390_format_VRS_RRDV --> s390_format_VRSd
Florian Krohm [Thu, 22 Jan 2026 20:18:55 +0000 (20:18 +0000)] 
s390: Rename s390_format_VRS_RRDV  -->  s390_format_VRSd

Add missing VRSd_... field access macros.

3 months agos390: Merge s390_format_VRS_VRDV and s390_format_VRS_VRDVM
Florian Krohm [Thu, 22 Jan 2026 20:03:37 +0000 (20:03 +0000)] 
s390: Merge s390_format_VRS_VRDV and s390_format_VRS_VRDVM

Add unused m4 parameter to s390_irgen_VLM / _VSTM. That way we no longer need
to distinguish between s390_format_VRS_VRDV and s390_format_VRS_VRDVM.
Rename remaining function to s390_format_VRSa and use it throughout.

Add field access macros VRSa_v1 and so on.

3 months agos390: Rename s390_format_VRV_VVRDMT and s390_format_VRS_RRDVM
Florian Krohm [Thu, 22 Jan 2026 18:40:35 +0000 (18:40 +0000)] 
s390: Rename s390_format_VRV_VVRDMT and s390_format_VRS_RRDVM

Rename s390_format_VRV_VVRDMT --> s390_format_VRV
Rename s390_format_VRS_RRDVM  --> s390_format_VRSc

3 months agos390: Rename s390_format_VSI_URDV to s390_format_VSI
Florian Krohm [Thu, 22 Jan 2026 17:27:30 +0000 (17:27 +0000)] 
s390: Rename s390_format_VSI_URDV to s390_format_VSI

Also make the order of function parameters consistent with other s390_format_...
functions.

3 months agos390: Merge s390_format_VRX_VRRDM and s390_format_VRX_VRRD
Florian Krohm [Thu, 22 Jan 2026 17:05:42 +0000 (17:05 +0000)] 
s390: Merge s390_format_VRX_VRRDM and s390_format_VRX_VRRD

Add unused m3 parameter to s390_irgen_VL / _VST. That way we no longer need
to distinguish between s390_format_VRX_VRRDM and s390_format_VRX_VRRD.
Rename remaining function to s390_format_VRX and use it throughout.

3 months agos390: Remove various s390_format_RXY_... functions.
Florian Krohm [Wed, 21 Jan 2026 23:00:06 +0000 (23:00 +0000)] 
s390: Remove various s390_format_RXY_... functions.

Rename s390_format_RSY_RRRD  ->  s390_format_RSY
Remove s390_format_RSY_R0RD  ->  s390_format_RSYb
Rename s390_format_RSY_RDRM  ->  s390_format_RSYcond
Remove s390_format_RSY_AARD use s390_format_RSY instead
Remove s390_format_RSY_RURD use s390_format_RSYb instead

3 months agos390: Rename s390_format_RXF_FRRDF --> s390_format_RXF
Florian Krohm [Wed, 21 Jan 2026 20:51:10 +0000 (20:51 +0000)] 
s390: Rename s390_format_RXF_FRRDF --> s390_format_RXF

3 months agos390: Remove unused functions s390_format_RRF_....
Florian Krohm [Wed, 21 Jan 2026 20:42:15 +0000 (20:42 +0000)] 
s390: Remove unused functions s390_format_RRF_....

Remove s390_format_RRFa_U0RR
Remove s390_format_RRF_FFRU
Remove s390_format_RRF_FUFF
Remove s390_format_RRF_FUFF2
Remove s390_format_RRF_F0FF
Remove s390_format_RRF_F0FF2
Remove s390_format_RRF_F0FR
Remove s390_format_RRF_M0RERE
Remove s390_format_RRF_RURR
Remove s390_format_RRF_R0RR2
Remove s390_format_RRF_UUFF
Remove s390_format_RRF_UUFF2
Remove s390_format_RRF_UUFR
Remove s390_format_RRF_UURF
Remove s390_format_RRF_U0RR
Remove s390_format_RRF_0UFF

Add field access macros for formats RRFa, RRFb, RRFc, RRFd and RRFe
as per Principles of Ops.
Add field access macros RRD_r1, RRD_r2, RRD_m3.
Remove field access macros RRF_..., RRF2_..., RRF3_..., RRF4_... and RRF5_...

3 months agoAdd SSE4.1 BLENDPD instruction for x86 32 bit
Alexandra Hájková [Wed, 14 Jan 2026 14:23:55 +0000 (09:23 -0500)] 
Add SSE4.1 BLENDPD instruction for x86 32 bit

Support blendpd (Blend Packed Double Precision Floating-Point
Values (XMM)) instruction in guest_x86_toIR.c. To be able to
use amd64 math_BLENDPD_128 function for x86 implementation, add
a new VEX/priv/guest_generic_sse.h header and move math_BLENDPD_128
there.

mkV128() was moveda from line 1671 in guest_amd64_toIR.c to line 295,
grouping it with other mkU* constant-creation helpers (mkU8, mkU16,
mkU32, mkU64). This allows guest_generic_sse.h to be included much
earlier (line 300 vs. line 1676), making the code organization more
natural.

The header includes an explaination why it must be included mid-file
(after IR helpers like newTemp, assign, binop, etc. are defined) and
why those helpers cannot be moved to a shared header (they depend on
file-local global state, particularly the 'irsb'
variable).

Add test function to sse4-common.h and update none/tests/x86/sse4-x86.c
to test the instruction.

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

3 months agoBug 514206 - Assertion '!sr_isError(sr)' failed - mmap fd points to an open descripto...
Paul Floyd [Tue, 20 Jan 2026 06:44:31 +0000 (07:44 +0100)] 
Bug 514206 - Assertion '!sr_isError(sr)' failed - mmap fd points to an open descriptor to a PCI device

Also reindent set_CEnt() a bit

3 months agos390: Rename s390_format_RXE_... functions
Florian Krohm [Sun, 18 Jan 2026 22:14:22 +0000 (22:14 +0000)] 
s390: Rename s390_format_RXE_...  functions

Rename s390_format_RXE_FRRD  --> s390_format_RXE0
Rename s390_format_RXE_RRRDR --> s390_format_RXE

3 months agos390: Remove / rename s390_format_RS_... functions
Florian Krohm [Sun, 18 Jan 2026 21:46:59 +0000 (21:46 +0000)] 
s390: Remove / rename s390_format_RS_...  functions

Remove functions s390_format_RS_RURD, s390_format_RS_RRRD and
s390_format_RS_AARD. Use s390_format_RS instead.
Actually, Principles of Ops has RS-a and RS-b formats. But those
differ only in how they name a particular opcode field and not how
the opcode's 4 bytes are divided up into fields. I did not bother
with that.

Rename s390_format_RS_R0RD --> s390_format_RS0

3 months agos390: Consolidate s390_format_SIL_... and s390_format_SIY... functions
Florian Krohm [Sat, 17 Jan 2026 23:37:37 +0000 (23:37 +0000)] 
s390: Consolidate s390_format_SIL_... and s390_format_SIY... functions

Instead use s390_format_SIL and s390_format_SIY, respectively.

3 months agos390: Rename and remove various s390_format_... functions
Florian Krohm [Sat, 17 Jan 2026 23:06:11 +0000 (23:06 +0000)] 
s390: Rename and remove various s390_format_... functions

Rename s390_format_S_RD   --> s390_format_S
Rename s390_format_SI_URD --> s390_format_SI
Rename s390_format_SS_L0RDRD --> s390_format_SSa
Rename s390_format_SMI_U0RDP --> s390_format_SMI
Rename s390_format_SSE_RDRD  --> s390_format_SSE
Remove s390_format_E
Remove s390_format_I
Remove s390_format_EI
Remove s390_format_MII_UPP
Remove s390_format_RSI_RRP
Remove s390_format_S_RD_raw

3 months agoBug 514762 - Many "Bad file descriptor" messages when using --track-fds=yes and ...
Paul Floyd [Sat, 17 Jan 2026 20:43:36 +0000 (21:43 +0100)] 
Bug 514762 - Many "Bad file descriptor" messages when using --track-fds=yes and -d on systems without /proc

Just a one-line deletion in the end.

3 months agoAdd support for fnop instruction on x86 and amd64
Mark [Sat, 17 Jan 2026 16:22:59 +0000 (17:22 +0100)] 
Add support for fnop instruction on x86 and amd64

This implements FNOP in guest_amd64_toIR.c and guest_x86_toIR.c by
simply skipping the instruction. Which is OK for now since one of the
x87 FP Limitations is no FP exceptions, except for handling stack
over/underflow.

Add fnop to none/tests/{amd64,x86}/insn_fpu.{def,stdout.exp}.

Also update old 3_1_BUGSTATUS.txt to correct bug number.

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

3 months agoHeap profiling: fix a few cc tags
Paul Floyd [Sat, 17 Jan 2026 16:44:47 +0000 (17:44 +0100)] 
Heap profiling: fix a few cc tags

3 months agoVG_(fcntl) error message and comments
Paul Floyd [Sat, 17 Jan 2026 15:59:19 +0000 (16:59 +0100)] 
VG_(fcntl) error message and comments

And the fcntl command to the VG_(fcntl) error message.
Clean up a few comments.

3 months agos390: Consolidate s390_format_RXY_... functions
Florian Krohm [Fri, 16 Jan 2026 08:42:55 +0000 (08:42 +0000)] 
s390: Consolidate s390_format_RXY_... functions

Use s390_format_RXY instead.

3 months agoRemove s390_format_RIE_RUPU, s390_format_RUPI and s390_format_RUPIX
Florian Krohm [Fri, 16 Jan 2026 00:09:27 +0000 (00:09 +0000)] 
Remove s390_format_RIE_RUPU, s390_format_RUPI and s390_format_RUPIX

Change field access macros from RIEv3_r1 -> RIEc_r1 and so on.
Add field access macros RIEg_r1, RIEg_m3 and RIEg_i2.

3 months agoRemove s390_format_RIE_RRI0 and s390_format_RRP
Florian Krohm [Thu, 15 Jan 2026 23:07:54 +0000 (23:07 +0000)] 
Remove s390_format_RIE_RRI0 and s390_format_RRP

Change field access macros from RIE_r1 -> RIEd_r1 and so on.
Add field access macros RIEe_r1, RIEe_r3 and RIEe_i2.

3 months agoRemove s390_format_RIE_RRPU
Florian Krohm [Thu, 15 Jan 2026 22:34:26 +0000 (22:34 +0000)] 
Remove s390_format_RIE_RRPU

Change field access macros from RIE_RRPU_r1 -> RIEb_r1 and so on.

3 months agoRemove s390_format_RIE_R0UU and s390_format_RIE_R0IU
Florian Krohm [Thu, 15 Jan 2026 22:25:51 +0000 (22:25 +0000)] 
Remove s390_format_RIE_R0UU and s390_format_RIE_R0IU

Change field access macros from RIE_R0xU_r1 -> RIEa_r1 and so on.
Also this time really remove s390_format_RIE_RRUUU.

3 months agoRemove s390_format_RIE_RRUUU
Florian Krohm [Thu, 15 Jan 2026 22:05:00 +0000 (22:05 +0000)] 
Remove s390_format_RIE_RRUUU

Also change field access macros from RIE_RRUUU_r1 -> RIEf_r1 and so on.

3 months agoUpdate s390-check-opcodes.pl
Florian Krohm [Thu, 15 Jan 2026 20:16:08 +0000 (20:16 +0000)] 
Update s390-check-opcodes.pl

Remove the --check-formats option. The specialisation of opcode names in
<binutils>/opcode/s390_opc.txt is no longer interesting as we do not need
to distinguish whether a register number in an opcode denotes a GPR od FPR
or whatever.
Instead it is better to use those opcode format names as shown in the
Principles of Ops wherever possible. Simplifies proofreading.

3 months agoBackport LTP patches to make listmount04 compile against newer kernels
Mark Wielaard [Thu, 15 Jan 2026 17:58:31 +0000 (18:58 +0100)] 
Backport LTP patches to make listmount04 compile against newer kernels

This adds three upstream patches to make the listmount04 testcase
build again:

  commit 36c51649dcc175f28fd500c01ba8cdd596f15aa4
  Author: Masahiro Yamada <masahiro.yamada@canonical.com>
  Date:   Wed Dec 3 17:12:26 2025 +0900

    listmount04: require kernel version 6.11

  commit 2d066ead3d6ef504c82551b12306e751d23ddb45
  Author: Wei Gao <wegao@suse.com>
  Date:   Sun Dec 14 02:15:20 2025 +0000

    listmount04.c: Update struct mnt_id_req support for kernel >= 6.18

  commit 262221320c6ddd094ee8059c327748dde1644936
  Author: Po-Hsu Lin via ltp <ltp@lists.linux.it>
  Date:   Fri Jan 9 00:21:52 2026 +0800

    listmount04.c: update struct mnt_id_req support to kernel >= 6.17.9

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

3 months agos390: Remove functions s390_format_RX_RRRD and s390_format_RX_FRRD
Florian Krohm [Thu, 15 Jan 2026 13:17:42 +0000 (13:17 +0000)] 
s390: Remove functions s390_format_RX_RRRD and s390_format_RX_FRRD

Use s390_format_RX instead
Cf. fa21e88ac38 for a rationale.

3 months agos390: Tweak s390_irgen_BC and s390_format_RX
Florian Krohm [Thu, 15 Jan 2026 13:09:41 +0000 (13:09 +0000)] 
s390: Tweak s390_irgen_BC and s390_format_RX

Remove unused parameters from s390_irgen_BC.
Adjust s390_format_RX accordingly.

3 months agos390: Consolidate s390_format_RIS_RURDU and s390_format_RIS_RURDI
Florian Krohm [Thu, 15 Jan 2026 11:27:06 +0000 (11:27 +0000)] 
s390: Consolidate s390_format_RIS_RURDU and s390_format_RIS_RURDI

Use s390_format_RIS instead.

Cf. fa21e88ac38 for a rationale.

3 months agos390: Remove s390_format_RIL and friends.
Florian Krohm [Thu, 15 Jan 2026 11:10:30 +0000 (11:10 +0000)] 
s390: Remove s390_format_RIL and friends.

This patch removes the functions: s390_format_RIL, s390_format_RIL_RU,
s390_format_RIL_RI, s390_format_RIL_RP and s390_format_RIL_UP.
Cf. fa21e88ac38 for a rationale.

3 months agos390: Remove s390_format_RI and friends.
Florian Krohm [Thu, 15 Jan 2026 10:34:56 +0000 (10:34 +0000)] 
s390: Remove s390_format_RI and friends.

This patch removes the functions: s390_format_RI, s390_format_RI_RU,
s390_format_RI_RI and s390_format_RI_RP.
Cf. fa21e88ac38 for a rationale.

3 months agos390: Remove s390_format_RRE and friends.
Florian Krohm [Thu, 15 Jan 2026 10:08:59 +0000 (10:08 +0000)] 
s390: Remove s390_format_RRE and friends.

This patch removes the functions: s390_format_RRE, s390_format_RRE_RR,
s390_format_RRE_FF, s390_format_RRE_RF, s390_format_RRE_FR,
s390_irgen_RRE_R0 and s390_irgen_RRE_F0.
Cf. fa21e88ac38 for a rationale.

3 months agos390: Remove s390_format_RR and friends.
Florian Krohm [Thu, 15 Jan 2026 09:19:10 +0000 (09:19 +0000)] 
s390: Remove s390_format_RR and friends.

This patch removes the functions: s390_format_RR, s390_format_RR_RR
and s390_format_RR_FF.

First, because of the disassembly changes in 370531396ad there is no
longer a need to specialise s390_format_RR because the register class
of its operands is now irrelevant. Hence s390_format_RR_RR and
s390_format_RR_FF can go.
Secondly, s390_irgen_RR only calls the function pointer being passed in.
So we can call that function directly and s390_irgen_RR can go as well.

The same reasoning also applies to other opcode formats. Patches will
follow soon. Having several installments gives a chance to actually
proofread them.

3 months agoBug 514613 - Unclosed leak_summary/still_reachable tag in xml output
Paul Floyd [Thu, 15 Jan 2026 07:44:52 +0000 (08:44 +0100)] 
Bug 514613 - Unclosed leak_summary/still_reachable tag in xml output

3 months agoFreeBSD regtest: update expected for access test
Paul Floyd [Thu, 15 Jan 2026 06:30:20 +0000 (07:30 +0100)] 
FreeBSD regtest: update expected for access test

For the previously incorrectly unchecked 4th argument that I added
yesterday.

3 months agoFreeBSD syscall: faccessat has 4 arguments, not 3
Paul Floyd [Wed, 14 Jan 2026 19:38:12 +0000 (20:38 +0100)] 
FreeBSD syscall: faccessat has 4 arguments, not 3

3 months agoFreeBSD syswrap: utimensat timespec can be NULL
Paul Floyd [Wed, 14 Jan 2026 08:00:07 +0000 (09:00 +0100)] 
FreeBSD syswrap: utimensat timespec can be NULL

3 months agomips: Add missing syscalls for mips32 and mips64
Petar Jovanovic [Tue, 13 Jan 2026 16:20:36 +0000 (16:20 +0000)] 
mips: Add missing syscalls for mips32 and mips64

Adding several syscall defines for mips32 and mips64.
This fixes a build break for mips variants.

3 months agoClarify a comment.
Florian Krohm [Mon, 12 Jan 2026 14:12:09 +0000 (14:12 +0000)] 
Clarify a comment.

3 months agoMakefile.am: Remove perl prefix from vg_perf and vg_regtest
Florian Krohm [Sun, 11 Jan 2026 21:52:10 +0000 (21:52 +0000)] 
Makefile.am: Remove perl prefix from vg_perf and vg_regtest

Those scripts are executable. Cf. b5b7e0238af

3 months agovg_regtest: Miscellaneous tweaks
Florian Krohm [Sun, 11 Jan 2026 17:54:59 +0000 (17:54 +0000)] 
vg_regtest: Miscellaneous tweaks

Drop the requirement that there must be at least one .stderr.exp
file. That way we can eliminate some 440 empty stderr.exp files and
a few stderrB.exp files.

Drop the requirement that there must be a "filter_stderr" script.
If there is nothing to filter (e.g. iropt-test) a filter script is
not meaningful. In that is so desired, specify an empty stderr_filter
and stderrB_filter in the .vgtest file.

3 months agoCode cleaning: use #elif in coregrind/m_trampoline.S
Paul Floyd [Sun, 11 Jan 2026 10:39:55 +0000 (11:39 +0100)] 
Code cleaning: use #elif in coregrind/m_trampoline.S

The code was using #else #if with an ever growing list of
Chained #elifs with just one #endif is nicer.

3 months agoCode cleaning: remove duplicate conditional blocks
Paul Floyd [Sat, 10 Jan 2026 15:04:59 +0000 (16:04 +0100)] 
Code cleaning: remove duplicate conditional blocks

vg_replace_strmem.c contained stpcpy twice for VGO_freebsd

3 months agoregtest: undo changes to str_tester as a workaround for darwin checked functions
Paul Floyd [Sat, 10 Jan 2026 14:53:43 +0000 (15:53 +0100)] 
regtest: undo changes to str_tester as a workaround for darwin checked functions

I had added parens to force the use of the function rarther than a
macro expanding to the _chk version. The _chk functions are now wrapped
so no longer need to keep the workaround.

3 months agoregtest: clean a bit of unused code
Paul Floyd [Fri, 9 Jan 2026 18:48:42 +0000 (19:48 +0100)] 
regtest: clean a bit of unused code

3 months agoFix typo
Paul Floyd [Fri, 9 Jan 2026 18:34:18 +0000 (19:34 +0100)] 
Fix typo

3 months agoDisable linux madvise MADV_GUARD_INSTALL
Mark Wielaard [Wed, 7 Jan 2026 21:20:49 +0000 (22:20 +0100)] 
Disable linux madvise MADV_GUARD_INSTALL

glibc 2.42+ (with linux 6.13+) uses MADV_GUARD_INSTALL to setup stack
guard pages. valgrind currently isn't able to track this and such
guard pages also don't show up in /proc maps (only in /proc pagemap
since linux 6.14). For now valgrind fails a madvise MADV_GUARD_INSTALL
syscall with EINVAL. This causes glibc to fall back to mprotect
PROT_NONE which valgrind is able to track.

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

3 months agovalgrind.h: FreeBSD cleanup
Paul Floyd [Tue, 6 Jan 2026 19:33:16 +0000 (20:33 +0100)] 
valgrind.h: FreeBSD cleanup

Wasn't undefining the PLAT macros
Add FreeBSD to the head and tail comments for each arch

amd64 is getting crowded, if we add any more OSes then I think
just "amd64 platforms" will be enough rather than listing 5 or 6
or more platforms.

3 months agosolaris readlinkat: check that buf is accessible for proc self path a.out
Paul Floyd [Sun, 4 Jan 2026 09:17:15 +0000 (10:17 +0100)] 
solaris readlinkat: check that buf is accessible for proc self path a.out

3 months agosyswrap readlink and linux readlinkat: check that buf is accessible for proc self...
Paul Floyd [Sun, 4 Jan 2026 08:34:54 +0000 (09:34 +0100)] 
syswrap readlink and linux readlinkat: check that buf is accessible for proc self exe case

Also update the t testcases to cover this.

3 months agoFix bug514094,vgtest typo in none/tests/Makefile.am
Mark Wielaard [Sat, 3 Jan 2026 21:50:28 +0000 (22:50 +0100)] 
Fix bug514094,vgtest typo in none/tests/Makefile.am

3 months agoregtest: fix warning
Paul Floyd [Sat, 3 Jan 2026 21:32:56 +0000 (22:32 +0100)] 
regtest: fix warning

Added a nice const named variable then didn't use it

3 months agoRegtest: add missing readlinkat_self files
Paul Floyd [Sat, 3 Jan 2026 21:16:58 +0000 (22:16 +0100)] 
Regtest: add missing readlinkat_self files

3 months agoreadlink[at] syswrap: limit copy to bufsiz when path is proc self exe
Paul Floyd [Sat, 3 Jan 2026 20:17:00 +0000 (21:17 +0100)] 
readlink[at] syswrap: limit copy to bufsiz when path is proc self exe

3 months agoBug 514094 - readlink("/proc/self/exe") overwrites buffer beyond its return value
Paul Floyd [Sat, 3 Jan 2026 12:48:50 +0000 (13:48 +0100)] 
Bug 514094 - readlink("/proc/self/exe") overwrites buffer beyond its return value

Used the reproducer as the basis for a test on Solaris and Linux.

3 months agoSolaris: set VG_(resolved_exename) in load_client()
Paul Floyd [Sat, 3 Jan 2026 17:24:34 +0000 (18:24 +0100)] 
Solaris: set VG_(resolved_exename) in load_client()

Haven't needed it yet, but I would like to try using it in the
readlink syscall wrapper.

3 months agoVEX: Fix srcdir != builddir build
Mark Wielaard [Sat, 3 Jan 2026 13:08:08 +0000 (14:08 +0100)] 
VEX: Fix srcdir != builddir build

commit 370531396ad1 ("s390: Use objdump machinery to disassemble insns")
broke srcdir != builddir builds with:

../../../VEX/priv/objdump/s390-dis.c:26:10: fatal error: main_util.h: No such file or directory
   26 | #include "main_util.h"     // vex_strlen
      |          ^~~~~~~~~~~~~

This comes from including the "wrong" priv directory for main_util.h
in Makefile.vex.am. Fix this by adding -I$(srcdir)/priv. This was
always wrong but didn't cause issues till now because of the extra
objdump subdir.

3 months agos390: Use objdump machinery to disassemble insns
Florian Krohm [Fri, 2 Jan 2026 16:44:49 +0000 (16:44 +0000)] 
s390: Use objdump machinery to disassemble insns

New directory VEX/priv/objdump to contain the bits and pieces
needed from binutils.

s390_disasm.c removed as the S390_DISASM machinery is no longer
needed.
host_s390_defs.c and guest_s390_toIR.c adjusted accordingly.

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

3 months agolibcfile VG_(lstat): make the #else #elif darwin
Paul Floyd [Thu, 1 Jan 2026 17:56:28 +0000 (18:56 +0100)] 
libcfile VG_(lstat): make the #else #elif darwin

and add a proper #else with a #error, which was missing

3 months agoUpdate AUTHORS
Paul Floyd [Thu, 1 Jan 2026 08:56:54 +0000 (09:56 +0100)] 
Update AUTHORS

Add an entry for Louis Brunner describing his macOS work.
Update my own entry to match the one for the 'developers' page
on valgrind.org.

3 months agos390 disasm-test: Add --all-except-exrl command line option.
Florian Krohm [Wed, 31 Dec 2025 18:55:37 +0000 (18:55 +0000)] 
s390 disasm-test: Add --all-except-exrl command line option.

EX and EXRL need special scaffolding and treatment.

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

3 months agoVEX: Support %i format
Florian Krohm [Wed, 31 Dec 2025 18:48:13 +0000 (18:48 +0000)] 
VEX: Support %i format

Small pre-patch for objdump-based disassembly.

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

3 months agoRegtest: use basic stderr filter for none/tests/iropt-test
Paul Floyd [Sun, 28 Dec 2025 10:34:38 +0000 (11:34 +0100)] 
Regtest: use basic stderr filter for none/tests/iropt-test

This was doing no filtering. macOS needs filtering in every
directory otherwise there wioll be a failure with a diff from
dsymutil like

+--49940-- run: /usr/bin/dsymutil "./iropt-test-sec"

4 months agoRegtest: another test that needs to increase the value for an 'unused' fd.
Paul Floyd [Sat, 27 Dec 2025 17:56:39 +0000 (18:56 +0100)] 
Regtest: another test that needs to increase the value for an 'unused' fd.

4 months agoRegtest: increase the 'unused' fd value in none use_after_close
Paul Floyd [Sat, 27 Dec 2025 17:48:28 +0000 (18:48 +0100)] 
Regtest: increase the 'unused' fd value in none use_after_close

Darwin 22 dyld seems to use 9 fds. We were using 7 as the 'unused'
value but that will soon be no longer true on all platforms.

4 months agoVEX: Add function vex_vsprintf.
Florian Krohm [Fri, 26 Dec 2025 20:24:50 +0000 (20:24 +0000)] 
VEX: Add function vex_vsprintf.

Small pre-patch for objdump-based disassembly.

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

4 months agoDarwin regtest: ensure no stdout output for memcheck/tests/darwin/deep_badparam
Paul Floyd [Fri, 26 Dec 2025 13:20:34 +0000 (14:20 +0100)] 
Darwin regtest: ensure no stdout output for memcheck/tests/darwin/deep_badparam

The test was doing a write of an uninit ilocal 32byte char buffer.
This has started outputting junk resulting in a stdout diff. So
make sure that the buffer only contains zeros (but still uninit).
Hope the compiler doesn't get too smart.

4 months agoDarwin regtest: update a filter following the previous commit
Paul Floyd [Fri, 26 Dec 2025 12:30:41 +0000 (13:30 +0100)] 
Darwin regtest: update a filter following the previous commit

4 months agoDarwin memcmp redir: fix platform related issue
Paul Floyd [Fri, 26 Dec 2025 12:20:15 +0000 (13:20 +0100)] 
Darwin memcmp redir: fix platform related issue

Replacing just _platform_memcmp results in crashes when returning
from the call. Instead on macOS 12 we need to replace the variant(s?).

4 months agoDarwin redir: add a replacement for memmem
Paul Floyd [Fri, 26 Dec 2025 09:19:53 +0000 (10:19 +0100)] 
Darwin redir: add a replacement for memmem

Of course, a bit different from the existing one.

4 months agoAdd SSE4.1 PMULLD instruction for x86 32 bit
Alexandra Hájková [Wed, 17 Dec 2025 11:59:19 +0000 (06:59 -0500)] 
Add SSE4.1 PMULLD instruction for x86 32 bit

Support pmulld (packed multiply 32-bit doubleword integers) instruction
in guest_x86_toIR.c and host_x86_isel.c. Add test function to
sse4-common.h and update none/tests/x86/sse4-x86.c to test the
instruction.

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