]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
3 months agoBug 486398 - SSE4a: unhandled instruction bytes: 0xF2 0xF 0x78 0xC0 0x8 0x18 0xC5... users/paulf/try-bug486398
Paul Floyd [Sun, 23 Mar 2025 13:18:10 +0000 (14:18 +0100)] 
Bug 486398 - SSE4a: unhandled instruction bytes: 0xF2 0xF 0x78 0xC0 0x8 0x18 0xC5 0xF9 0x7E 0x84 (insertq $24, $8, %xmm0, %xmm0)

3 months agoBug 501893 - Missing suppression for __wcscat_avx2 (strcat-strlen-avx2.h.S:68)?
Paul Floyd [Sun, 23 Mar 2025 09:21:29 +0000 (10:21 +0100)] 
Bug 501893 - Missing suppression for __wcscat_avx2 (strcat-strlen-avx2.h.S:68)?

3 months agos390x: Fix BZ 498629
Florian Krohm [Sat, 22 Mar 2025 18:56:09 +0000 (18:56 +0000)] 
s390x: Fix BZ 498629

IR generation for S[L]HHHR and S[L]HHLR was broken. Now fixed as obvious.

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

3 months agos390x: Fix BZ 498632
Florian Krohm [Sat, 22 Mar 2025 18:51:04 +0000 (18:51 +0000)] 
s390x: Fix BZ 498632

IR generation for LNGFR was broken. Now fixed.

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

3 months agoBug 501850 - FreeBSD syscall arguments 7 and 8 incorrect.
Paul Floyd [Sat, 22 Mar 2025 07:15:35 +0000 (08:15 +0100)] 
Bug 501850 - FreeBSD syscall arguments 7 and 8 incorrect.

3 months agos390x: Fix disassembly for vector insns
Florian Krohm [Fri, 21 Mar 2025 23:08:49 +0000 (23:08 +0000)] 
s390x: Fix disassembly for vector insns

This was painful because there is a lot of irregularity in the
extended mnemonics. There is also a double-maintenance issue because
S390_DISASM is used both in guest_s390_to_IR.c and in the 'emit'
functions in host_s390_defs.c.  It might be worth exploring whether
the objdump disassembler can be extracted from binutils and re-used
here. That way the disassembly would be correct by construction.
And the double maintenance would go away.

Fix a few things alongside:
- In s390_format_VRI_VIM: is is a signed 16-bit value. So it needs to be
  sign-extended. Fixes disassembly for VLEI[BHFG]
- Fix function dvb_operand. v0 is not special.
- In s390_format_VRX_VRRDM pass forgotten m3 to S390_DISASM.
- In s390_irgen_VCNF: remove s390_insn_assert. VCNF does not have
  specification exceptions.
- Opcope VFLL has no mask m5. So s390_format_VRRa_VVMMM is the wrong format
  function. Change it to s390_format_VRRa_VVMM.
  In s390_irgen_VFLL: the value of m5 is not used in s390_vector_fp_convert
  because rounding == False. So, essentially, m5 is a don't care.
- Add VRR_v3 and use it when a vector register is meant (instead of VRR_r3)
- Add VRR_v4 and use it when a vector register is meant (instead of VRR_m4)
- Add VRS_r3 and use it when a GPR is meant (instead of VRS_v3)
- Add VRR_r2 and use it when a GPR is meant (instead of VRR_v2)
- Add field-access macros for the VRV opcode format. Use them.
- Add field-access macros for the VRIb opcode format. Use them.
- Add field-access macros for the VRIc opcode format. Use them.
- Add field-access macros for the VRSc opcode format. Use them.

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

3 months agoBug 501846 - Add x86 Linux shm wrappers
Paul Floyd [Fri, 21 Mar 2025 20:41:55 +0000 (21:41 +0100)] 
Bug 501846 - Add x86 Linux shm wrappers

3 months agoWrap linux specific userfaultfd syscall
Martin Cermak [Tue, 18 Mar 2025 17:17:30 +0000 (18:17 +0100)] 
Wrap linux specific userfaultfd syscall

userfaultfd takes a flags argument and returns a file descriptor.
It shows up in the Linux Test Project syscalls tests as unhandled.

Declare a sys_userfaultfd wrapper in priv_syswrap-linux.h and hook it
for {amd64,arm,arm64,mips64,nanomips,ppc32,ppc64,riscv64,s390x,x86}-linux
using LINXY with PRE/POST handlers in syswrap-linux.c.

Define __NR_userfaultfd in vki-scnums-s390x-linux.h. It was already
defined for all other arches.

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

3 months agoIllumos regtest: add an expected for memcheck/tests/vcpu_fnfns
Paul Floyd [Sun, 16 Mar 2025 17:46:27 +0000 (18:46 +0100)] 
Illumos regtest: add an expected for memcheck/tests/vcpu_fnfns

Minor numerical diffs, 'inf' vs 'infinity' (why isn't that
standardised?).

3 months agos390x: Rework s390_disasm interface (BZ 498942)
Florian Krohm [Sat, 15 Mar 2025 23:18:59 +0000 (23:18 +0000)] 
s390x: Rework s390_disasm interface  (BZ 498942)

The way extended mnemonics were communicated to s390_disasm was a bit messy
and, more importantly, error prone. The primary reason is that extended
mnemonics were added late in the game (at the time) and sort of force-fitted
on top of the existing scheme. Here are a few examples showing the new
way of doing things:

old: s390_disasm(ENC3(MNM, GPR, UINT), mnm, r1, i2);
new: S390_DISASM(MNM(mnm), GPR(r1), UINT(i2));

old: s390_disasm(ENC3(MNM, FPR, UDXB), mnm, r1, d2, x2, b2);
new: S390_DISASM(MNM(mnm), FPR(r1), UDXB(d2, x2, b2));

The arguments to S390_DISASM are essentially constructors for the various
opcode fields. They appear in the same order as written in Principles of Ops.

old: s390_disasm(ENC4(XMNM, GPR, INT, CABM), S390_XMNM_CAB, mnm, m3, r1, i2, m3);
new: S390_DISASM(XMNM(mnm, cabt_disasm), GPR(r1), INT(i2), MASK(m3));

The 2nd argument to XMNM() is a function that constructs the extended mnemonic
and writes the disassembed insn as appropriate.

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

3 months agos390x: misc. fixes pertaining to vector insns
Florian Krohm [Sat, 15 Mar 2025 22:29:30 +0000 (22:29 +0000)] 
s390x: misc. fixes pertaining to vector insns

This patch is fall-out from working on fixing the disassembly for
the vector insns.

Specifically:
1) replace vassert with s390_insn_assert where appropriate
2) add missing s390_insn_asserts (many)
3) remove incorrect s390_insn_asserts (few)
4) check availability of vector opcodes based on hardware capabilities
   and issue an emulation failure if opcode is not available
5) fix a typo in a mnemonic: vfspo -> vfpso
6) inline function s390_vr_get_n_elem

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

3 months agos390x: Header file tweak
Florian Krohm [Sat, 15 Mar 2025 16:51:00 +0000 (16:51 +0000)] 
s390x: Header file tweak

Thou shalt write header files in a way that they are compilable
entities on their own.

3 months agoBug 501479 - Illumos DRD pthread_mutex_init wrapper errors
Paul Floyd [Fri, 14 Mar 2025 20:56:35 +0000 (21:56 +0100)] 
Bug 501479 - Illumos DRD pthread_mutex_init wrapper errors

3 months agoDarwin: close fd after call to ML_(check_macho_and_get_rw_loads)
Paul Floyd [Thu, 13 Mar 2025 19:47:28 +0000 (20:47 +0100)] 
Darwin: close fd after call to ML_(check_macho_and_get_rw_loads)

I missed changing the code so that the VG_(close) happens for all
platforms, not just non-Darwin.

3 months agoDarwin: change message for failure to open a binary
Paul Floyd [Thu, 13 Mar 2025 07:35:17 +0000 (08:35 +0100)] 
Darwin: change message for failure to open a binary

Previously was always ELF, now either ELF or mach-o.

3 months agos390x: Fix BZ 496950
Florian Krohm [Wed, 12 Mar 2025 23:10:06 +0000 (23:10 +0000)] 
s390x: Fix BZ 496950

Adding a new hardware capability requires changes in several places.
Generally for a new FOO hardware capability:
- add VEX_HWCAPS_S390X_FOO and update VEX_HWCAPS_S390X_ALL in libvex.h
- test the corresponding facility bit in m_machine.c
- add s390_host_has_foo in host_s390_defs.h
- if an insn requiring FOO cannot be implemented on the host by other means
  - add EmFail_S390X_foo in libvex_emnote.h
- handle EmFail_S390X_foo in main_main.c
- update function show_hwcaps_s390x

Occasionally something gets forgotten and this patch adds the forgotten
pieces.
Also add new hardware capabilities vxe2, vxd, msa, msa4, msa8, msa9

Fixes: https://bugs.kde.org/show_bug.cgi?id=496950
3 months agos390x: Remove macro definitions for hardware facilities
Florian Krohm [Wed, 12 Mar 2025 22:36:33 +0000 (22:36 +0000)] 
s390x: Remove macro definitions for hardware facilities

Remove the facility-bit macros S390_FAC_...
They are guaranteed to never change and are used only in m_machine.c

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

3 months agoadd_hardwired_spec for ld-linux-x86-64.so.2 memcmp
Mark Wielaard [Wed, 12 Mar 2025 12:57:19 +0000 (13:57 +0100)] 
add_hardwired_spec for ld-linux-x86-64.so.2 memcmp

With RPATH processing ld.so compiled for x86-64-v3 uses an optimized
avx2 memcmp (bcmp) which causes (false postive) memcheck invalid reads
of size 32 warnings.

Fix this my adding a hardwire spec with a simpler memcmp for
ld-linux-x86-64.so.2.

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

Authored-by: Florian Weimer <fweimer@redhat.com>
3 months agom_debuginfo/debuginfo.c (di_notify_mmap): Ignore memfd_create mappings
Mark Wielaard [Wed, 12 Mar 2025 12:42:12 +0000 (13:42 +0100)] 
m_debuginfo/debuginfo.c (di_notify_mmap): Ignore memfd_create mappings

When valgrind observes a mapping of a memfd_create anonymous file it
would generate a warning:

 WARNING: Serious error when reading debug info
 When reading debug info from /memfd:mozilla-ipc (deleted):
 failed to stat64/stat this file

All such memfd_create anonymous files are always prefixed with
"memfd:" and obviously cannot be stat64/stat. So ignore such warnings.

Tested-by: ishikawa@yk.rim.or.jp
3 months agoSolaris suppressions: add suppressions for Solaris 11.4 getaddrinfo
Paul Floyd [Wed, 12 Mar 2025 07:33:11 +0000 (08:33 +0100)] 
Solaris suppressions: add suppressions for Solaris 11.4 getaddrinfo

getaddrinfo, the bane of all threading tests.

3 months agoSolaris regtest: fdleak filter, change __xnet_socket to just socket
Paul Floyd [Wed, 12 Mar 2025 07:12:10 +0000 (08:12 +0100)] 
Solaris regtest: fdleak filter, change __xnet_socket to just socket

3 months agoIllumos regtest: add a filter for shell 'Abort' messages
Paul Floyd [Tue, 11 Mar 2025 19:50:07 +0000 (20:50 +0100)] 
Illumos regtest: add a filter for shell 'Abort' messages

3 months agoIllumos fdleak: dup2 spurious errors
Paul Floyd [Tue, 11 Mar 2025 19:36:30 +0000 (20:36 +0100)] 
Illumos fdleak: dup2 spurious errors

We should also put back checks that calls like dup2 aren't
using reserved file descriptors.

3 months agoRegtest: filter out pathname from memcheck dw4 test
Paul Floyd [Tue, 11 Mar 2025 08:10:42 +0000 (09:10 +0100)] 
Regtest: filter out pathname from memcheck dw4 test

3 months agoFix more int to pointer warnings.
Paul Floyd [Tue, 11 Mar 2025 06:40:48 +0000 (07:40 +0100)] 
Fix more int to pointer warnings.

No more produced with GCC 14 on OI.

3 months agos390x: disasm-test: Fix thinko
Florian Krohm [Mon, 10 Mar 2025 12:36:21 +0000 (12:36 +0000)] 
s390x: disasm-test: Fix thinko

Remove verbiage about limited support for opcodes with optional operands.
Optional operands are of no concern for disassembly. The reason is that
disassembly sees as its input only a sequence of bytes which have no
indication as to whether some of its bits were explicitly specified or not.
We're testing the disassembler here - not the assembler.

3 months agodocs/Makefile.am: Make sure xml catalog file exists for xmllint check
Mark Wielaard [Sun, 9 Mar 2025 15:46:50 +0000 (16:46 +0100)] 
docs/Makefile.am: Make sure xml catalog file exists for xmllint check

When XML_CATALOG_FILES don't exist on the system xmllint will have to
query those files through various websites. When there is a network
error xmllint will fail. So make sure to only run the validity tests
when both xmllint and XML_CATALOG_FILES exists.

3 months agocoregrind/m_debuginfo: don't try to examine zero sized mmapped files
Mark Wielaard [Sun, 9 Mar 2025 14:59:29 +0000 (15:59 +0100)] 
coregrind/m_debuginfo: don't try to examine zero sized mmapped files

When run on an nfs filesystem memcheck/tests/pointer-trace fails
because it generates warnings "connection to image failed". This is
caused by trying to mmap a deleted file which the nfs file system
represents as a (hidden) regular file. This is normally not a problem
except when that file is empty.

Fix this by not trying to check whether a file is an ELF or MACHO
against an empty (regular) file in di_notify_mmap. An empty file is
never a valid ELF or MACHO file (and cannot be represented as
DiImage).

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

3 months agoFix int to pointer warnings
Paul Floyd [Sat, 8 Mar 2025 08:20:53 +0000 (09:20 +0100)] 
Fix int to pointer warnings

and a minnor correction for a comment about ELF segment handling

3 months agoBug 501194 - Fix ML_(check_macho_and_get_rw_loads) so that it is correct for any...
Paul Floyd [Fri, 7 Mar 2025 22:12:13 +0000 (23:12 +0100)] 
Bug 501194 - Fix ML_(check_macho_and_get_rw_loads) so that it is correct for any number of segment commands

3 months agoFreeBSD regtest: getrlimitusage on arm64
Paul Floyd [Fri, 7 Mar 2025 06:00:26 +0000 (07:00 +0100)] 
FreeBSD regtest: getrlimitusage on arm64

Resident memory isn't stable even when truncated to a
multiple of ten milllion. I.e., zero digits of useful precision.
So just set this field to zero like the other flaky values.

3 months agos390x: Fix VLRL and VSTRL insns (Bug 498422)
Florian Krohm [Thu, 6 Mar 2025 18:39:26 +0000 (18:39 +0000)] 
s390x: Fix VLRL and VSTRL insns   (Bug 498422)

The replacement field for these insns is 12-bit wide. So its value
cannot possibly be represented by a UChar. Use UShort instead.

This was found by disasm-test like so:

./disasm-test --run vlrl
*** mismatch VEX: |vlrl  %v6,255,4|    objdump: |vlrl  %v6,4095,4|

./disasm-test --run vstrl
*** mismatch VEX: |vstrl  %v6,255(%r4),7|   objdump: |vstrl  %v6,4095(%r4),7|

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

3 months agos390x: Add disassembly checker (Bug 498037)
Florian Krohm [Thu, 6 Mar 2025 17:42:05 +0000 (17:42 +0000)] 
s390x: Add disassembly checker (Bug 498037)

Add program disasm-test to check that s390_disasm generates the same
disassembly for a given insn than objdump -d does.  The focus is on insns
that have extended mnemonics most of which are vector insns.
The checker resides in none/tests/s390x/disasm-test with comprehensive
documentation in the README file there.
It is integrated into the regression testing framework but currently
disabled, because s390_disasm has not been fixed yet.

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

3 months agoFix two outdated comments in VEX.
Florian Krohm [Wed, 5 Mar 2025 23:12:17 +0000 (23:12 +0000)] 
Fix two outdated comments in VEX.

main_util.c: The symbol vg_message no longer exists.

host_s390_defs.c: In b2cc7ea009ae4f0eaa1197ee6f5c07e0ee873b3a the definition
of s390_host_hwcaps was moved to main_main.c

3 months agoriscv64: Avoid warning about missing return value in stat wrapper
Andreas Schwab [Fri, 23 Jun 2023 12:25:27 +0000 (14:25 +0200)] 
riscv64: Avoid warning about missing return value in stat wrapper

m_libcfile.c: In function 'vgPlain_stat':
m_libcfile.c:594:1: error: control reaches end of non-void function [-Werror=return-type]
  594 | }
      | ^

3 months agoNEWS file: Sort fixed bugs by increasing bug number
Florian Krohm [Wed, 5 Mar 2025 22:35:01 +0000 (22:35 +0000)] 
NEWS file: Sort fixed bugs by increasing bug number

3 months agos390x: Add missing NEWS entry
Florian Krohm [Wed, 5 Mar 2025 22:24:32 +0000 (22:24 +0000)] 
s390x: Add missing NEWS entry

Add missing NEWS entry for https://bugs.kde.org/show_bug.cgi?id=495816
which was fixed in 1e694434a5cd2a0352e97f872ebd6922129c0282.

3 months agosyswrap-generic: Emit pp_ExeContext after the file descriptor backtrace
Alexandra Hájková [Mon, 3 Mar 2025 11:14:08 +0000 (06:14 -0500)] 
syswrap-generic: Emit pp_ExeContext after the file descriptor backtrace

Adjust use_after_close test for the change.

3 months agoriscv64: Add hardwire for ld-linux-riscv64-lp64d.so.1 strcmp
Mark Wielaard [Sat, 28 Dec 2024 00:29:58 +0000 (01:29 +0100)] 
riscv64: Add hardwire for ld-linux-riscv64-lp64d.so.1 strcmp

When using dlopen ld.so can end up in glibc strcmp_unaligned_loop
which causes undefined reads. Hardwire strcmp for ld.so with a simple
assembly implementation.

3 months agoriscv64: syswrap various shared linux syscalls
Mark Wielaard [Thu, 26 Dec 2024 12:18:09 +0000 (13:18 +0100)] 
riscv64: syswrap various shared linux syscalls

syswrap-riscv64-linux.c: Hook up open_tree, move_mount, fsopen,
fsconfig, fsmount, fspick, pidfd_open, openat2, pidfd_getfd,
epoll_pwait2, landlock_create_ruleset, landlock_add_rule,
landlock_restrict_self and fchmodat2.

3 months agoVEX/priv/guest_riscv64_toIR.c: Recognize both fence and fence.tso
Mark Wielaard [Sat, 14 Dec 2024 22:11:57 +0000 (22:11 +0000)] 
VEX/priv/guest_riscv64_toIR.c: Recognize both fence and fence.tso

fence.tso is used for __atomic_thread_fence (__ATOMIC_ACQ_REL)

There are 3 fence variants.

fence.tso  fm set to 1000 and pred and succ both set to 0011.
fence with fm set to 0000 and pred and succ both set to 1111.
fence with fm set to 0000 and pred and succ with some iorw flags set.

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

3 months agonone/tests/riscv64/integer.c: replace zero by a1
Mark Wielaard [Tue, 24 Dec 2024 23:36:53 +0000 (00:36 +0100)] 
none/tests/riscv64/integer.c: replace zero by a1

Using zero will produce an gas Error: illegal operands `la zero,0'
https://sourceware.org/bugzilla/show_bug.cgi?id=32496

Simplest seems to be to replace the usage of "zero" in the branch
instruction tests by "a1".  It seems that does test something similar
that isn't tested before.

3 months agoriscv64: Add initial support: test modifications
Petr Pavlu [Tue, 11 Apr 2023 19:30:43 +0000 (19:30 +0000)] 
riscv64: Add initial support: test modifications

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

Some integration fixes were added by Mark Wielaard <mark@klomp.org>
- helgrind/tests/tc11_XCHG.c: Fix XCHG_M_R guard

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

3 months agoriscv64: Add initial support: VEX modifications
Petr Pavlu [Tue, 11 Apr 2023 19:30:43 +0000 (19:30 +0000)] 
riscv64: Add initial support: VEX modifications

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

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

3 months agoriscv64: Add initial support: Valgrind modifications
Petr Pavlu [Tue, 11 Apr 2023 19:30:42 +0000 (19:30 +0000)] 
riscv64: Add initial support: Valgrind modifications

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

coredump filter is different between Solaris and Illumos

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

Was causing a failure in one Massif test

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

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

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

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

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

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

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

This reverts commit 98cc2209b5c1690a8d181d372c6a248fbd3b2134.

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

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

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

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

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

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

Pushed the binary by mistake in Sept 2023!

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Test 2 on Darwin generated SIGBUS not SIGSEGV.

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

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

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

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

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

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

Add a feature test for timer_delete.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

EVIOCGRAB just takes an int argument.

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

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

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

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

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

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

Prevents huge numbers of errors with Qt apps.

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

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

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

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

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

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

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

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