]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
5 months agoregtest: move /proc test to freebsd for none procfs-cmdline-exe
Paul Floyd [Sat, 14 Feb 2026 20:15:52 +0000 (21:15 +0100)] 
regtest: move /proc test to freebsd for none procfs-cmdline-exe

5 months agoFix none/tests/freebsd/Makefile.am: procfs-cmdline-exe..stderr.exp typo
Mark Wielaard [Sat, 14 Feb 2026 19:43:47 +0000 (20:43 +0100)] 
Fix none/tests/freebsd/Makefile.am: procfs-cmdline-exe..stderr.exp typo

Should have just one dot ('.').

5 months agoBug 515992 - Add FreeBSD /proc virtualisation for cmdline and file
Paul Floyd [Sat, 14 Feb 2026 17:52:12 +0000 (18:52 +0100)] 
Bug 515992 - Add FreeBSD /proc virtualisation for cmdline and file

5 months agoregtest: clean out procfs-cmldline-exe vgtest and exp files from Makefile.am
Paul Floyd [Sat, 14 Feb 2026 15:58:44 +0000 (16:58 +0100)] 
regtest: clean out procfs-cmldline-exe vgtest and exp files from Makefile.am

5 months agoRegtest: split none procfs-cmdline-exe into one version per platform
Paul Floyd [Sat, 14 Feb 2026 15:37:42 +0000 (16:37 +0100)] 
Regtest: split none procfs-cmdline-exe into one version per platform

This was linux and non-linux where non-linux really meant
non-linux non-solaris non-freebsd i.e., darwin only.

I need to add a FreeBSD version (and /proc support for cmdline).

5 months agoSolaris regtest: make Solaris specific procfs-cmdline-exe.c
Paul Floyd [Sat, 14 Feb 2026 15:57:45 +0000 (16:57 +0100)] 
Solaris regtest: make Solaris specific procfs-cmdline-exe.c

Use /proc/pid_or_self/path/a.out rather than /proc/pid_or_self/exe
as in the parent directory.

I'm going to split this test into versions for each platform,
Darwin (with no /proc) can use the Linux one. FreeBSD optionally
has /proc but uses currproc instead of self.

5 months agoAdd bacck the return type for handle_self_exe_open
Paul Floyd [Sat, 14 Feb 2026 14:25:44 +0000 (15:25 +0100)] 
Add bacck the return type for handle_self_exe_open

5 months agoLinux syswrap: handle_self_exe_open is also now static and Linux only.
Paul Floyd [Sat, 14 Feb 2026 14:23:06 +0000 (15:23 +0100)] 
Linux syswrap: handle_self_exe_open is also now static and Linux only.

5 months agoSolaris syswrap: make handle_auxx_open a static function
Paul Floyd [Sat, 14 Feb 2026 15:12:21 +0000 (16:12 +0100)] 
Solaris syswrap: make handle_auxx_open a static function

handle_psinfo_open and handle_cmdline_open are Solaris statics but
ML_(handle_auxv_open) was shared between Linux and Solaris. There is
some common code but I find it less confusing to have all 3 statics
in the same place for Solaris.

This makes handle_auxv_open static for both.

5 months agosyswrap cleanup: remove Solaris references in generic sys_open
Paul Floyd [Sat, 14 Feb 2026 12:36:02 +0000 (13:36 +0100)] 
syswrap cleanup: remove Solaris references in generic sys_open

On Solaris sys_open is handled in syswrap-solaris.c

5 months agoSolaris syscall wrapper: add procfs cmdline sp[ecial handling to sys_open
Paul Floyd [Sat, 14 Feb 2026 13:22:18 +0000 (14:22 +0100)] 
Solaris syscall wrapper: add procfs cmdline sp[ecial handling to sys_open

Generally it seems that older Solaris (11.3) and OpenIndiana use 'old'
sys_open and do not have procfs cmdline. Newer Solaris (11.4) uses
sys_openat and has procfs cmdline.

OmniOS mixes both, it uses old sys_open and has procfs cmdline.

5 months agos390x: Rename s390_format_VRR*() functions
Andreas Arnez [Fri, 13 Feb 2026 16:12:00 +0000 (17:12 +0100)] 
s390x: Rename s390_format_VRR*() functions

After having renamed most of the s390_format_*() functions to match the
names in the z/Architecture Principles of Operation, the last remaining
format functions yet to be renamed are the ones dealing with variants of
the VRR format.

Rename the functions accordingly:

  current       new     sample insn
  ------------  -----   -----------
  VRR_VV        VRRa0   vlr
  VRR_VVM       VRRa1   vclz
  VRRa_VVMM     VRRa2   vfsq
  VRRa_VVMMM    VRRa    vcdg
  VRR_VVVMM     VRRb    vceq
  VRR_VVV       VRRc0   vn
  VRR_VVVM      VRRc1   va
  VRRa_VVVMM    VRRc2   vfa
  VRRa_VVVMMM   VRRc    vfmin
  VRRd_VVVVM    VRRd1   vac
  VRRd_VVVVMM   VRRd    vmsl
  VRR_VVVV      VRRe0   vperm
  VRRe_VVVVMM   VRRe    vfma
  VRR_VRR       VRRf    vlvgp

Note that none of these directly cover the VISTR instruction.  But that
can be treated as the VRRa format, where m4 is left unused.  So do that
and remove s390_VRR_VVMM(), which previously existed just for this
purpose.

Also, adjust the names of the VRR*() macros to match the format names.
Drop VRRa_v*() and VRRd_v*() and use VRR_v*() instead, since the vector
fields' positions don't depend on the VRR format variant.

5 months agos390x: Simplify interface of vector format functions
Andreas Arnez [Fri, 13 Feb 2026 11:38:52 +0000 (12:38 +0100)] 
s390x: Simplify interface of vector format functions

Same as with the non-vector instructions, simplify the interface of the
vector format functions.

5 months agos390x: Simplify interface of non-vector insn format functions
Andreas Arnez [Fri, 13 Feb 2026 11:38:52 +0000 (12:38 +0100)] 
s390x: Simplify interface of non-vector insn format functions

Each of the format functions in the translator provides common logic for
handling a specific instruction format.  So far a format function's
interface is defined such that it receives instruction operands as
individual arguments.

This means that the extraction of operands from the opcode -- despite
being common for all invocations of the same format function -- is
duplicated every time.  This is error-prone, results in longer code
overall, and makes the invocations more difficult to read.

The code duplication can be avoided by moving the operand extraction to
the format functions themselves.

Do this for all non-vector instruction formats.

5 months agoUpdate the LTP version in valgrind testsuite to v20260130
Martin Cermak [Fri, 13 Feb 2026 11:26:52 +0000 (12:26 +0100)] 
Update the LTP version in valgrind testsuite to v20260130

Update the LTP version in valgrind testsuite to v20260130.
All patches from auxprogs/ltp-patches were accepted by LTP
upstream and included in the release, so these can now be
dropped locally.

5 months agoSolaris regtest: fix build of one x86 SSE test on OmniOS
Paul Floyd [Thu, 12 Feb 2026 19:48:01 +0000 (20:48 +0100)] 
Solaris regtest: fix build of one x86 SSE test on OmniOS

5 months agodoc: mention other realloc family functions in realloc size zero error description
Paul Floyd [Thu, 12 Feb 2026 12:05:03 +0000 (13:05 +0100)] 
doc: mention other realloc family functions in realloc size zero error description

Also add C23 making realloc size zero UB.

5 months agoBug 515731 - Distinguish between realloc functions in realloc size 0 error messages
Paul Floyd [Mon, 9 Feb 2026 06:22:52 +0000 (07:22 +0100)] 
Bug 515731 - Distinguish between realloc functions in realloc size 0 error messages

5 months agos390: Fix VG_(machine_get_size_of_largest_guest_register)
Florian Krohm [Tue, 10 Feb 2026 22:27:40 +0000 (22:27 +0000)] 
s390: Fix VG_(machine_get_size_of_largest_guest_register)

Return 16 if the machine has vector registers.

5 months agos390x: Fix handling of KIMD-GHASH
Andreas Arnez [Tue, 10 Feb 2026 11:57:48 +0000 (12:57 +0100)] 
s390x: Fix handling of KIMD-GHASH

The KIMD-GHASH function of the "compute intermediate message digest"
instruction is missing from the list returned by KIMD-Query, because the
appropriate bit is set in the wrong field of the returned array.  Fix
this.

5 months agoDarwin: don't print "run:dsymutil" unless VG_(clo_verbosity) > 0
Paul Floyd [Mon, 9 Feb 2026 11:04:25 +0000 (12:04 +0100)] 
Darwin: don't print "run:dsymutil" unless VG_(clo_verbosity) > 0

This causes something to end up in stderr.out in regression tests.
There is a filter for it, but that does not apply to tests like
iropt-test that really expect no output and have no stderr filter.

5 months agoLinux reallocarray: update testcase and expected
Paul Floyd [Sun, 8 Feb 2026 18:09:25 +0000 (19:09 +0100)] 
Linux reallocarray: update testcase and expected

5 months agoFreeBSD reallocarray: behaves like realloc on allocation failure
Paul Floyd [Sun, 8 Feb 2026 16:57:30 +0000 (17:57 +0100)] 
FreeBSD reallocarray: behaves like realloc on allocation failure

It was behaving like reallocf which frees the ptr if the allocation
fails. That's wrong, it behaves like realloc which does not free
ptr. Updated the one regression test.

I also noticed that the error message always mentions realloc
even for reallocf and reallocarray.

5 months agoAdd --num-callers change to NEWS
Paul Floyd [Sun, 8 Feb 2026 15:03:30 +0000 (16:03 +0100)] 
Add --num-callers change to NEWS

5 months agoppc regtest: add another expected for memcheck/tests/linux/rfcomm
Paul Floyd [Sun, 8 Feb 2026 09:03:21 +0000 (10:03 +0100)] 
ppc regtest: add another expected for memcheck/tests/linux/rfcomm

This was failing on cfarm120 with diffs like

- in frame #1, created by main (rfcomm.c:26)
+ in frame #0, created by bind (???:)

I'm not sure why there is a change for the frame where the socket
struct is created. cfarm120 doesn't have the glibc dedbuginfo
package installed.

5 months agoppc regtest: update expected for none fdleak_ipv4_xml
Paul Floyd [Sun, 8 Feb 2026 08:55:28 +0000 (09:55 +0100)] 
ppc regtest: update expected for none fdleak_ipv4_xml

Should now pass on cfarm120

5 months agoppc64le regtest: update a few xml expecteds
Paul Floyd [Sat, 7 Feb 2026 11:04:12 +0000 (12:04 +0100)] 
ppc64le regtest: update a few xml expecteds

5 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.

5 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.

5 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

5 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

5 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

5 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

5 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

5 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`

5 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

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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

5 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.

5 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.

5 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.

5 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

5 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

5 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.

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

6 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.

6 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>

6 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).

6 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.

6 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.

6 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.

6 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

6 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.

6 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.

6 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

6 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

6 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_...

6 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

6 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

6 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

6 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

6 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.

6 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

6 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.

6 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

6 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

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

6 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

6 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.

6 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

6 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

6 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.

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

6 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

6 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.

6 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.

6 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

6 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.