Compare commits

...

No commits in common. "c8" and "c9-beta" have entirely different histories.
c8 ... c9-beta

25 changed files with 2948 additions and 219 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/valgrind-3.22.0.tar.bz2
SOURCES/valgrind-3.23.0.tar.bz2

1
.valgrind.metadata Normal file
View File

@ -0,0 +1 @@
ec410c75d3920d4f9249a5cfa2cac31e1bf6d586 SOURCES/valgrind-3.23.0.tar.bz2

View File

@ -0,0 +1,31 @@
From 2afcd730a10d61c318289bc4c39c42eebd4b35a6 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Mon, 29 Apr 2024 15:15:46 +0200
Subject: [PATCH 01/11] Prepare NEWS for branch 3.23 fixes
---
NEWS | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/NEWS b/NEWS
index 11c67410fb6f..8bdd3753f7bb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,14 @@
+Branch 3.23
+~~~~~~~~~~~
+
+* ==================== FIXED BUGS ====================
+
+The following bugs have been fixed or resolved on this branch.
+
+To see details of a given bug, visit
+ https://bugs.kde.org/show_bug.cgi?id=XXXXXX
+where XXXXXX is the bug number as listed above.
+
Release 3.23.0 (26 Apr 2024)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
2.45.2

View File

@ -0,0 +1,83 @@
From 2e26af756d69c53026bf2d6d61589f754796340d Mon Sep 17 00:00:00 2001
From: Paul Floyd <pjfloyd@wanadoo.fr>
Date: Sat, 27 Apr 2024 13:07:07 +0200
Subject: [PATCH 02/11] 486180 [MIPS] 'VexGuestArchState' has no member named
'guest_IP_AT_SYSCALL'
(cherry picked from commit 7214886886bce9029f325214156c02dcfff760d5)
---
NEWS | 2 ++
VEX/priv/guest_mips_helpers.c | 4 ++++
VEX/pub/libvex_guest_mips32.h | 6 +++---
VEX/pub/libvex_guest_mips64.h | 2 ++
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/NEWS b/NEWS
index 8bdd3753f7bb..c40e00cce46b 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ Branch 3.23
The following bugs have been fixed or resolved on this branch.
+486180 [MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
+
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
where XXXXXX is the bug number as listed above.
diff --git a/VEX/priv/guest_mips_helpers.c b/VEX/priv/guest_mips_helpers.c
index 74cfb9c34caa..79197378cc74 100644
--- a/VEX/priv/guest_mips_helpers.c
+++ b/VEX/priv/guest_mips_helpers.c
@@ -187,6 +187,8 @@ void LibVEX_GuestMIPS32_initialise( /*OUT*/ VexGuestMIPS32State * vex_state)
vex_state->guest_w1.w64[1] = 0;
vex_state->guest_w2.w64[0] = 0;
vex_state->guest_w2.w64[1] = 0;
+
+ vex_state->guest_IP_AT_SYSCALL = 0;
}
void LibVEX_GuestMIPS64_initialise ( /*OUT*/ VexGuestMIPS64State * vex_state )
@@ -294,6 +296,8 @@ void LibVEX_GuestMIPS64_initialise ( /*OUT*/ VexGuestMIPS64State * vex_state )
vex_state->guest_LLaddr = 0xFFFFFFFFFFFFFFFFULL;
vex_state->guest_LLdata = 0;
+ vex_state->guest_IP_AT_SYSCALL = 0;
+
vex_state->guest_MSACSR = 0;
}
diff --git a/VEX/pub/libvex_guest_mips32.h b/VEX/pub/libvex_guest_mips32.h
index 214f63cdbe8c..e769819d75ae 100644
--- a/VEX/pub/libvex_guest_mips32.h
+++ b/VEX/pub/libvex_guest_mips32.h
@@ -188,10 +188,10 @@ typedef
/* 1016 */ UInt guest_MSACSR;
- /* 1020 */ UInt _padding3;
+ /* 1020 */ UInt guest_IP_AT_SYSCALL;
- /* 1020 */ ULong guest_LLdata64;
- /* 1028 */ ULong _padding4;
+ /* 1024 */ ULong guest_LLdata64;
+ /* 1032 */ ULong _padding3;
} VexGuestMIPS32State;
/*---------------------------------------------------------------*/
/*--- Utility functions for MIPS32 guest stuff. ---*/
diff --git a/VEX/pub/libvex_guest_mips64.h b/VEX/pub/libvex_guest_mips64.h
index 657fe6fa3343..a953f0ab86a2 100644
--- a/VEX/pub/libvex_guest_mips64.h
+++ b/VEX/pub/libvex_guest_mips64.h
@@ -184,6 +184,8 @@ typedef
/* 1144 */ UInt guest_MSACSR;
/* 1148 */ UInt _padding2;
+ /* 1152 */ ULong guest_IP_AT_SYSCALL;
+ /* 1160 */ ULong _padding3;
} VexGuestMIPS64State;
--
2.45.2

View File

@ -0,0 +1,96 @@
From 14141bb4a6ea528b4c0b9295aa64348f7a675735 Mon Sep 17 00:00:00 2001
From: Paul Floyd <pjfloyd@wanadoo.fr>
Date: Wed, 1 May 2024 09:24:14 +0200
Subject: [PATCH 03/11] Bug 486293 - memccpy false positives
(cherry picked from commit 805c020c6e5161966e6eb0099ebe937a510cea9e)
---
NEWS | 1 +
memcheck/tests/memccpy2.c | 20 ++++++++++++++++++++
memcheck/tests/memccpy2.stderr.exp | 4 ++--
shared/vg_replace_strmem.c | 4 ++--
4 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/NEWS b/NEWS
index c40e00cce46b..f674191a286a 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Branch 3.23
The following bugs have been fixed or resolved on this branch.
486180 [MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
+486293 memccpy false positives
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
diff --git a/memcheck/tests/memccpy2.c b/memcheck/tests/memccpy2.c
index a5a1dfc9f0af..947324581715 100644
--- a/memcheck/tests/memccpy2.c
+++ b/memcheck/tests/memccpy2.c
@@ -1,6 +1,8 @@
#include <ctype.h>
#include <stdio.h>
#include <string.h>
+#include <assert.h>
+#include <stdlib.h>
int main(void)
{
@@ -9,5 +11,23 @@ int main(void)
memccpy(astring+10, astring, '#', len-10);
sprintf(astring, "this is a string # with something to seek");
memccpy(astring, astring+10, '#', len);
+
+ sprintf(astring, "this is a string # with something to seek");
+ /*
+ * space is earlier than len, no overlap
+ * "this " gets copied (up to and including the first ' ')
+ * and it overwrites the destination starting with the 's' of "string"
+ * so res will point to the 'g' of "string"
+ */
+ char* res = memccpy(astring+10, astring, ' ', len-10);
+ assert(res && *res == 'g');
+ sprintf(astring, "this is a string # with something to seek");
+ /* length is 0, nothing copied, returns NULL */
+ res = memccpy(astring, "abcdefhhijklmnopqrstuvwxy", 'z', 0);
+ assert(NULL == res);
+ /* 'z' not found so 20 bytes copied, returns NULL */
+ res = memccpy(astring, "abcdefhhijklmnopqrstuvwxy", 'z', 20);
+ assert(NULL == res);
+ free(astring);
}
diff --git a/memcheck/tests/memccpy2.stderr.exp b/memcheck/tests/memccpy2.stderr.exp
index 0132ef06c56a..240ce925c182 100644
--- a/memcheck/tests/memccpy2.stderr.exp
+++ b/memcheck/tests/memccpy2.stderr.exp
@@ -1,8 +1,8 @@
Source and destination overlap in memccpy(0x........, 0x........, 31)
at 0x........: memccpy (vg_replace_strmem.c:...)
- by 0x........: main (memccpy2.c:9)
+ by 0x........: main (memccpy2.c:11)
Source and destination overlap in memccpy(0x........, 0x........, 41)
at 0x........: memccpy (vg_replace_strmem.c:...)
- by 0x........: main (memccpy2.c:11)
+ by 0x........: main (memccpy2.c:13)
diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c
index 737abbf67898..ae13a2a5f87a 100644
--- a/shared/vg_replace_strmem.c
+++ b/shared/vg_replace_strmem.c
@@ -2364,9 +2364,9 @@ static inline void my_exit ( int x )
\
while (i-- > 0) \
if ((*d++ = *s++) == x) { \
- SizeT srclen = (i < len) ? i : len; \
+ SizeT srclen = len - i; \
RECORD_COPY(srclen); \
- if (is_overlap(dst, src, srclen, srclen)) \
+ if (is_overlap(dst, src, len, srclen)) \
RECORD_OVERLAP_ERROR("memccpy", dst, src, len); \
return d; \
} \
--
2.45.2

View File

@ -0,0 +1,138 @@
From 3795a011eeb9730cda9f0beadce70aab8aa71e68 Mon Sep 17 00:00:00 2001
From: Paul Floyd <pjfloyd@wanadoo.fr>
Date: Sat, 4 May 2024 15:03:11 +0200
Subject: [PATCH 04/11] Bug 486569 - linux inotify_init syscall wrapper missing
POST entry in syscall_table
(cherry picked from commit b38115cc6087f30f872c533f93c7c31a6d73eb24)
---
NEWS | 1 +
coregrind/m_syswrap/syswrap-amd64-linux.c | 2 +-
coregrind/m_syswrap/syswrap-arm-linux.c | 2 +-
coregrind/m_syswrap/syswrap-mips32-linux.c | 2 +-
coregrind/m_syswrap/syswrap-mips64-linux.c | 2 +-
coregrind/m_syswrap/syswrap-ppc32-linux.c | 2 +-
coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 +-
coregrind/m_syswrap/syswrap-s390x-linux.c | 2 +-
coregrind/m_syswrap/syswrap-x86-linux.c | 2 +-
9 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/NEWS b/NEWS
index f674191a286a..b65f9206679b 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ The following bugs have been fixed or resolved on this branch.
486180 [MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
486293 memccpy false positives
+486569 linux inotify_init syscall wrapper missing POST entry in syscall_table
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
index a59e01826ca2..86a47d9c2811 100644
--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
@@ -773,7 +773,7 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_keyctl, sys_keyctl), // 250
LINX_(__NR_ioprio_set, sys_ioprio_set), // 251
LINX_(__NR_ioprio_get, sys_ioprio_get), // 252
- LINX_(__NR_inotify_init, sys_inotify_init), // 253
+ LINXY(__NR_inotify_init, sys_inotify_init), // 253
LINX_(__NR_inotify_add_watch, sys_inotify_add_watch), // 254
LINX_(__NR_inotify_rm_watch, sys_inotify_rm_watch), // 255
diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
index 217b1c49dc9d..7b536e52cb2e 100644
--- a/coregrind/m_syswrap/syswrap-arm-linux.c
+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
@@ -922,7 +922,7 @@ static SyscallTableEntry syscall_main_table[] = {
// LINX_(__NR_ioprio_set, sys_ioprio_set), // 289
// LINX_(__NR_ioprio_get, sys_ioprio_get), // 290
- LINX_(__NR_inotify_init, sys_inotify_init), // 291
+ LINXY(__NR_inotify_init, sys_inotify_init), // 291
LINX_(__NR_inotify_add_watch, sys_inotify_add_watch), // 292
LINX_(__NR_inotify_rm_watch, sys_inotify_rm_watch), // 293
// LINX_(__NR_migrate_pages, sys_migrate_pages), // 294
diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c
index 3f991da0a18d..e2f499eb80f8 100644
--- a/coregrind/m_syswrap/syswrap-mips32-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips32-linux.c
@@ -1037,7 +1037,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINXY (__NR_mq_timedreceive, sys_mq_timedreceive), // 274
LINX_ (__NR_mq_notify, sys_mq_notify), // 275
LINXY (__NR_mq_getsetattr, sys_mq_getsetattr), // 276
- LINX_ (__NR_inotify_init, sys_inotify_init), // 275
+ LINXY (__NR_inotify_init, sys_inotify_init), // 275
LINX_ (__NR_inotify_add_watch, sys_inotify_add_watch), // 276
LINX_ (__NR_inotify_rm_watch, sys_inotify_rm_watch), // 277
LINXY (__NR_waitid, sys_waitid), // 278
diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c
index 9899a21cfa78..24f2bcc93956 100644
--- a/coregrind/m_syswrap/syswrap-mips64-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips64-linux.c
@@ -759,7 +759,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINX_ (__NR_request_key, sys_request_key),
LINXY (__NR_keyctl, sys_keyctl),
PLAX_ (__NR_set_thread_area, sys_set_thread_area),
- LINX_ (__NR_inotify_init, sys_inotify_init),
+ LINXY (__NR_inotify_init, sys_inotify_init),
LINX_ (__NR_inotify_add_watch, sys_inotify_add_watch),
LINX_ (__NR_inotify_rm_watch, sys_inotify_rm_watch),
LINXY (__NR_openat, sys_openat),
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
index 0aabfbb179ec..74ba68564cd8 100644
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
@@ -944,7 +944,7 @@ static SyscallTableEntry syscall_table[] = {
LINX_(__NR_ioprio_set, sys_ioprio_set), // 273
LINX_(__NR_ioprio_get, sys_ioprio_get), // 274
- LINX_(__NR_inotify_init, sys_inotify_init), // 275
+ LINXY(__NR_inotify_init, sys_inotify_init), // 275
LINX_(__NR_inotify_add_watch, sys_inotify_add_watch), // 276
LINX_(__NR_inotify_rm_watch, sys_inotify_rm_watch), // 277
PLAXY(__NR_spu_run, sys_spu_run), // 278
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
index 35e3f8ec4ee4..4609e10df363 100644
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
@@ -928,7 +928,7 @@ static SyscallTableEntry syscall_table[] = {
LINX_(__NR_ioprio_set, sys_ioprio_set), // 273
LINX_(__NR_ioprio_get, sys_ioprio_get), // 274
- LINX_(__NR_inotify_init, sys_inotify_init), // 275
+ LINXY(__NR_inotify_init, sys_inotify_init), // 275
LINX_(__NR_inotify_add_watch, sys_inotify_add_watch), // 276
LINX_(__NR_inotify_rm_watch, sys_inotify_rm_watch), // 277
diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
index f941bdd1907a..9ed2fa46888f 100644
--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
@@ -751,7 +751,7 @@ static SyscallTableEntry syscall_table[] = {
LINXY(__NR_waitid, sys_waitid), // 281
LINX_(__NR_ioprio_set, sys_ioprio_set), // 282
LINX_(__NR_ioprio_get, sys_ioprio_get), // 283
- LINX_(__NR_inotify_init, sys_inotify_init), // 284
+ LINXY(__NR_inotify_init, sys_inotify_init), // 284
LINX_(__NR_inotify_add_watch, sys_inotify_add_watch), // 285
LINX_(__NR_inotify_rm_watch, sys_inotify_rm_watch), // 286
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
index c6cf682e797c..ea930bafe3ec 100644
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
@@ -1508,7 +1508,7 @@ static SyscallTableEntry syscall_table[] = {
LINX_(__NR_ioprio_set, sys_ioprio_set), // 289
LINX_(__NR_ioprio_get, sys_ioprio_get), // 290
- LINX_(__NR_inotify_init, sys_inotify_init), // 291
+ LINXY(__NR_inotify_init, sys_inotify_init), // 291
LINX_(__NR_inotify_add_watch, sys_inotify_add_watch), // 292
LINX_(__NR_inotify_rm_watch, sys_inotify_rm_watch), // 293
// LINX_(__NR_migrate_pages, sys_migrate_pages), // 294
--
2.45.2

View File

@ -0,0 +1,282 @@
From f5d1c336e9276dd5947ef94c9831d9d53673b75b Mon Sep 17 00:00:00 2001
From: Paul Floyd <pjfloyd@wanadoo.fr>
Date: Thu, 9 May 2024 21:01:52 +0200
Subject: [PATCH 05/11] aarch64 frinta and frinta vector instructions
The initial fix for Bug 484426 only corrected frinta and frintn
scalar instructions. This adds support for the vector variants.
(cherry picked from commit 7b66a5b58219ac1a4865da8e371edbdb8d765f32)
---
NEWS | 1 +
VEX/priv/guest_arm64_toIR.c | 47 ++++++----
none/tests/arm64/frinta_frintn.cpp | 141 +++++++++++++++++++++++++++++
3 files changed, 171 insertions(+), 18 deletions(-)
diff --git a/NEWS b/NEWS
index b65f9206679b..adb52169dd87 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ The following bugs have been fixed or resolved on this branch.
486180 [MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
486293 memccpy false positives
486569 linux inotify_init syscall wrapper missing POST entry in syscall_table
+n-i-bz aarch64 frinta and frinta vector instructions
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
diff --git a/VEX/priv/guest_arm64_toIR.c b/VEX/priv/guest_arm64_toIR.c
index c7e395b4b63d..27d945d6328d 100644
--- a/VEX/priv/guest_arm64_toIR.c
+++ b/VEX/priv/guest_arm64_toIR.c
@@ -13821,46 +13821,57 @@ Bool dis_AdvSIMD_two_reg_misc(/*MB_OUT*/DisResult* dres, UInt insn)
/* -------- 1,1x,11000 (apparently unassigned) (7) -------- */
/* -------- 1,1x,11001 FRINTI 2d_2d, 4s_4s, 2s_2s (8) -------- */
/* rm plan:
- FRINTN: tieeven -- !! FIXME KLUDGED !!
+ FRINTN: tieeven
FRINTM: -inf
FRINTP: +inf
FRINTZ: zero
- FRINTA: tieaway -- !! FIXME KLUDGED !!
+ FRINTA: tieaway
FRINTX: per FPCR + "exact = TRUE"
FRINTI: per FPCR
*/
Bool isD = (size & 1) == 1;
if (bitQ == 0 && isD) return False; // implied 1d case
- IRTemp irrmRM = mk_get_IR_rounding_mode();
-
- UChar ch = '?';
- IRTemp irrm = newTemp(Ity_I32);
+ UChar ch = '?';
+ IROp op = isD ? Iop_RoundF64toInt : Iop_RoundF32toInt;
+ Bool isBinop = True;
+ IRExpr* irrmE = NULL;
switch (ix) {
- case 1: ch = 'n'; assign(irrm, mkU32(Irrm_NEAREST)); break;
- case 2: ch = 'm'; assign(irrm, mkU32(Irrm_NegINF)); break;
- case 3: ch = 'p'; assign(irrm, mkU32(Irrm_PosINF)); break;
- case 4: ch = 'z'; assign(irrm, mkU32(Irrm_ZERO)); break;
+ case 1: ch = 'n'; isBinop = False; op = isD ? Iop_RoundF64toIntE : Iop_RoundF32toIntE; break;
+ case 2: ch = 'm'; irrmE = mkU32(Irrm_NegINF); break;
+ case 3: ch = 'p'; irrmE = mkU32(Irrm_PosINF); break;
+ case 4: ch = 'z'; irrmE = mkU32(Irrm_ZERO); break;
// The following is a kludge. Should be: Irrm_NEAREST_TIE_AWAY_0
- case 5: ch = 'a'; assign(irrm, mkU32(Irrm_NEAREST)); break;
+ case 5: ch = 'a'; isBinop = False; op = isD ? Iop_RoundF64toIntA0 : Iop_RoundF32toIntA0; break;
// I am unsure about the following, due to the "integral exact"
// description in the manual. What does it mean? (frintx, that is)
- case 6: ch = 'x'; assign(irrm, mkexpr(irrmRM)); break;
- case 8: ch = 'i'; assign(irrm, mkexpr(irrmRM)); break;
+ case 6: ch = 'x'; irrmE = mkexpr(mk_get_IR_rounding_mode()); break;
+ case 8: ch = 'i'; irrmE = mkexpr(mk_get_IR_rounding_mode()); break;
default: vassert(0);
}
- IROp opRND = isD ? Iop_RoundF64toInt : Iop_RoundF32toInt;
if (isD) {
for (UInt i = 0; i < 2; i++) {
- putQRegLane(dd, i, binop(opRND, mkexpr(irrm),
- getQRegLane(nn, i, Ity_F64)));
+ if (isBinop) {
+ IRTemp irrm = newTemp(Ity_I32);
+ assign(irrm, irrmE);
+ putQRegLane(dd, i, binop(op, mkexpr(irrm),
+ getQRegLane(nn, i, Ity_F64)));
+ } else {
+ putQRegLane(dd, i, unop(op, getQRegLane(nn, i, Ity_F64)));
+ }
}
} else {
UInt n = bitQ==1 ? 4 : 2;
for (UInt i = 0; i < n; i++) {
- putQRegLane(dd, i, binop(opRND, mkexpr(irrm),
- getQRegLane(nn, i, Ity_F32)));
+ if (isBinop) {
+ IRTemp irrm = newTemp(Ity_I32);
+ assign(irrm, irrmE);
+ putQRegLane(dd, i, binop(op, mkexpr(irrm),
+ getQRegLane(nn, i, Ity_F32)));
+ } else {
+ putQRegLane(dd, i, unop(op, getQRegLane(nn, i, Ity_F32)));
+ }
}
if (bitQ == 0)
putQRegLane(dd, 1, mkU64(0)); // zero out lanes 2 and 3
diff --git a/none/tests/arm64/frinta_frintn.cpp b/none/tests/arm64/frinta_frintn.cpp
index 8e13761eb966..c0803688f698 100644
--- a/none/tests/arm64/frinta_frintn.cpp
+++ b/none/tests/arm64/frinta_frintn.cpp
@@ -36,6 +36,55 @@ void test_frinta(T input, T expected)
}
}
+template<typename T>
+void test_frinta_fullvec(T* input, T* expected)
+{
+ T result[2*sizeof(double)/sizeof(T)];
+ T* rp = result;
+ if constexpr (std::is_same_v<double, T> == true)
+ {
+ __asm__ __volatile__(
+ "ldr q23, [%1];\n"
+ "frinta v22.2d, v23.2d;\n"
+ "str q22, [%0];\n"
+ : "+rm" (rp)
+ : "r" (input)
+ : "memory", "v22", "v23");
+ assert(result[0] == expected[0]);
+ assert(result[1] == expected[1]);
+ }
+ else
+ {
+ __asm__ __volatile__(
+ "ldr q23, [%1];\n"
+ "frinta v22.4s, v23.4s;\n"
+ "str q22, [%0];\n"
+ : "+rm" (rp)
+ : "r" (input)
+ : "memory", "v22", "v23");
+ assert(result[0] == expected[0]);
+ assert(result[1] == expected[1]);
+ assert(result[2] == expected[2]);
+ assert(result[3] == expected[3]);
+ }
+}
+
+void test_frinta_halfvec(float* input, float* expected)
+{
+ float result[2];
+ float* rp = result;
+ __asm__ __volatile__(
+ "ldr d23, [%1];\n"
+ "frinta v22.2s, v23.2s;\n"
+ "str d22, [%0];\n"
+ : "+rm" (rp)
+ : "r" (input)
+ : "memory", "v22", "v23");
+ assert(result[0] == expected[0]);
+ assert(result[1] == expected[1]);
+}
+
+
template<typename T>
void test_frintn(T input, T expected)
{
@@ -66,6 +115,54 @@ void test_frintn(T input, T expected)
}
}
+template<typename T>
+void test_frintn_fullvec(T* input, T* expected)
+{
+ T result[2*sizeof(double)/sizeof(T)];
+ T* rp = result;
+ if constexpr (std::is_same_v<double, T> == true)
+ {
+ __asm__ __volatile__(
+ "ldr q23, [%1];\n"
+ "frintn v22.2d, v23.2d;\n"
+ "str q22, [%0];\n"
+ : "+rm" (rp)
+ : "r" (input)
+ : "memory", "v22", "v23");
+ assert(result[0] == expected[0]);
+ assert(result[1] == expected[1]);
+ }
+ else
+ {
+ __asm__ __volatile__(
+ "ldr q23, [%1];\n"
+ "frintn v22.4s, v23.4s;\n"
+ "str q22, [%0];\n"
+ : "+rm" (rp)
+ : "r" (input)
+ : "memory", "v22", "v23");
+ assert(result[0] == expected[0]);
+ assert(result[1] == expected[1]);
+ assert(result[2] == expected[2]);
+ assert(result[3] == expected[3]);
+ }
+}
+
+void test_frintn_halfvec(float* input, float* expected)
+{
+ float result[2];
+ float* rp = result;
+ __asm__ __volatile__(
+ "ldr d23, [%1];\n"
+ "frintn v22.2s, v23.2s;\n"
+ "str d22, [%0];\n"
+ : "+rm" (rp)
+ : "r" (input)
+ : "memory", "v22", "v23");
+ assert(result[0] == expected[0]);
+ assert(result[1] == expected[1]);
+}
+
int main()
{
// round "away from zero"
@@ -78,6 +175,36 @@ int main()
test_frinta(-1.5F, -2.0F);
test_frinta(-2.5F, -3.0F);
+ double in1[] = {1.5, 1.5};
+ double out1[] = {2.0, 2,0};
+ test_frinta_fullvec(in1, out1);
+ double in2[] = {2.5, 2.5};
+ double out2[] = {3.0, 3,0};
+ test_frinta_fullvec(in2, out2);
+ double in3[] = {-1.5, -1.5};
+ double out3[] = {-2.0, -2,0};
+ test_frinta_fullvec(in3, out3);
+ double in4[] = {-2.5, -2.5};
+ double out4[] = {-3.0, -3,0};
+ test_frinta_fullvec(in4, out4);
+
+ float in1f[] = {1.5F, 1.5F, 1.5F, 1.5F};
+ float out1f[] = {2.0F, 2.0F, 2.0F, 2.0F};
+ test_frinta_fullvec(in1f, out1f);
+ test_frinta_halfvec(in1f, out1f);
+ float in2f[] = {2.5F, 2.5F, 2.5F, 2.5F};
+ float out2f[] = {3.0F, 3.0F, 3.0F, 3.0F};
+ test_frinta_fullvec(in2f, out2f);
+ test_frinta_halfvec(in2f, out2f);
+ float in3f[] = {-1.5F, -1.5F, -1.5F, -1.5F};
+ float out3f[] = {-2.0F, -2.0F, -2.0F, -2.0F};
+ test_frinta_fullvec(in3f, out3f);
+ test_frinta_halfvec(in3f, out3f);
+ float in4f[] = {-2.5F, -2.5F, -2.5F, -2.5F};
+ float out4f[] = {-3.0F, -3.0F, -3.0F, -3.0F};
+ test_frinta_fullvec(in4f, out4f);
+ test_frinta_halfvec(in4f, out4f);
+
// round "to even"
test_frintn(1.5, 2.0);
test_frintn(2.5, 2.0);
@@ -87,5 +214,19 @@ int main()
test_frintn(2.5F, 2.0F);
test_frintn(-1.5F, -2.0F);
test_frintn(-2.5F, -2.0F);
+
+ test_frintn_fullvec(in1, out1);
+ test_frintn_fullvec(in2, out1);
+ test_frintn_fullvec(in3, out3);
+ test_frintn_fullvec(in4, out3);
+
+ test_frintn_fullvec(in1f, out1f);
+ test_frintn_halfvec(in1f, out1f);
+ test_frintn_fullvec(in2f, out1f);
+ test_frintn_halfvec(in2f, out1f);
+ test_frintn_fullvec(in3f, out3f);
+ test_frintn_halfvec(in3f, out3f);
+ test_frintn_fullvec(in4f, out3f);
+ test_frintn_halfvec(in4f, out3f);
}
--
2.45.2

View File

@ -0,0 +1,169 @@
From 726f930355ca74b4aa4c656979224c9b7a706244 Mon Sep 17 00:00:00 2001
From: Aleksandar Rikalo <arikalo@gmail.com>
Date: Fri, 10 May 2024 17:59:28 +0200
Subject: [PATCH 06/11] mips: skip using shared syscall numbers for mips32
mips does not use shared syscall numbers, so we can not use
vki-scnums-shared-linux.h.
This partially fixes KDE #444781.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Aleksandar Rikalo <arikalo@gmail.com>
(cherry picked from commit 54d6ad3348fb50f5b972fe9c05d0d8757bfe73ba)
---
coregrind/m_syswrap/syswrap-mips32-linux.c | 1 +
include/pub_tool_vkiscnums_asm.h | 2 -
include/vki/vki-scnums-mips32-linux.h | 105 ++++++++++++++++-----
3 files changed, 83 insertions(+), 25 deletions(-)
diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c
index e2f499eb80f8..e3498cd96f9b 100644
--- a/coregrind/m_syswrap/syswrap-mips32-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips32-linux.c
@@ -1110,6 +1110,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINX_ (__NR_pwritev2, sys_pwritev2), // 362
//..
LINXY(__NR_statx, sys_statx), // 366
+ GENX_(__NR_rseq, sys_ni_syscall), // 367
LINXY(__NR_clock_gettime64, sys_clock_gettime64), // 403
LINX_(__NR_clock_settime64, sys_clock_settime64), // 404
diff --git a/include/pub_tool_vkiscnums_asm.h b/include/pub_tool_vkiscnums_asm.h
index 8a26f834a93e..d3d7dc19be9d 100644
--- a/include/pub_tool_vkiscnums_asm.h
+++ b/include/pub_tool_vkiscnums_asm.h
@@ -63,8 +63,6 @@
# include "vki/vki-scnums-arm64-linux.h"
#elif defined(VGP_mips32_linux)
-# include "vki/vki-scnums-shared-linux.h"
-# include "vki/vki-scnums-32bit-linux.h"
# include "vki/vki-scnums-mips32-linux.h"
#elif defined(VGP_nanomips_linux)
diff --git a/include/vki/vki-scnums-mips32-linux.h b/include/vki/vki-scnums-mips32-linux.h
index e452a2e6c8d0..d4f8de15aac7 100644
--- a/include/vki/vki-scnums-mips32-linux.h
+++ b/include/vki/vki-scnums-mips32-linux.h
@@ -380,35 +380,94 @@
#define __NR_setns (__NR_Linux + 343)
#define __NR_process_vm_readv (__NR_Linux + 345)
#define __NR_process_vm_writev (__NR_Linux + 346)
-#define __NR_kcmp (__NR_Linux + 347)
-#define __NR_finit_module (__NR_Linux + 348)
-#define __NR_sched_setattr (__NR_Linux + 349)
-#define __NR_sched_getattr (__NR_Linux + 350)
-#define __NR_renameat2 (__NR_Linux + 351)
-#define __NR_seccomp (__NR_Linux + 352)
-#define __NR_getrandom (__NR_Linux + 353)
-#define __NR_memfd_create (__NR_Linux + 354)
-#define __NR_bpf (__NR_Linux + 355)
-#define __NR_execveat (__NR_Linux + 356)
-#define __NR_userfaultfd (__NR_Linux + 357)
-#define __NR_membarrier (__NR_Linux + 358)
-#define __NR_mlock2 (__NR_Linux + 359)
-#define __NR_copy_file_range (__NR_Linux + 360)
-#define __NR_preadv2 (__NR_Linux + 361)
-#define __NR_pwritev2 (__NR_Linux + 362)
-#define __NR_pkey_mprotect (__NR_Linux + 363)
-#define __NR_pkey_alloc (__NR_Linux + 364)
-#define __NR_pkey_free (__NR_Linux + 365)
-#define __NR_statx (__NR_Linux + 366)
-
+#define __NR_kcmp (__NR_Linux + 347)
+#define __NR_finit_module (__NR_Linux + 348)
+#define __NR_sched_setattr (__NR_Linux + 349)
+#define __NR_sched_getattr (__NR_Linux + 350)
+#define __NR_renameat2 (__NR_Linux + 351)
+#define __NR_seccomp (__NR_Linux + 352)
+#define __NR_getrandom (__NR_Linux + 353)
+#define __NR_memfd_create (__NR_Linux + 354)
+#define __NR_bpf (__NR_Linux + 355)
+#define __NR_execveat (__NR_Linux + 356)
+#define __NR_userfaultfd (__NR_Linux + 357)
+#define __NR_membarrier (__NR_Linux + 358)
+#define __NR_mlock2 (__NR_Linux + 359)
+#define __NR_copy_file_range (__NR_Linux + 360)
+#define __NR_preadv2 (__NR_Linux + 361)
+#define __NR_pwritev2 (__NR_Linux + 362)
+#define __NR_pkey_mprotect (__NR_Linux + 363)
+#define __NR_pkey_alloc (__NR_Linux + 364)
+#define __NR_pkey_free (__NR_Linux + 365)
+#define __NR_statx (__NR_Linux + 366)
+#define __NR_rseq (__NR_Linux + 367)
+#define __NR_io_pgetevents (__NR_Linux + 368)
+#define __NR_semget (__NR_Linux + 393)
+#define __NR_semctl (__NR_Linux + 394)
+#define __NR_shmget (__NR_Linux + 395)
+#define __NR_shmctl (__NR_Linux + 396)
+#define __NR_shmat (__NR_Linux + 397)
+#define __NR_shmdt (__NR_Linux + 398)
+#define __NR_msgget (__NR_Linux + 399)
+#define __NR_msgsnd (__NR_Linux + 400)
+#define __NR_msgrcv (__NR_Linux + 401)
+#define __NR_msgctl (__NR_Linux + 402)
+#define __NR_clock_gettime64 (__NR_Linux + 403)
+#define __NR_clock_settime64 (__NR_Linux + 404)
+#define __NR_clock_adjtime64 (__NR_Linux + 405)
+#define __NR_clock_getres_time64 (__NR_Linux + 406)
+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407)
+#define __NR_timer_gettime64 (__NR_Linux + 408)
+#define __NR_timer_settime64 (__NR_Linux + 409)
+#define __NR_timerfd_gettime64 (__NR_Linux + 410)
+#define __NR_timerfd_settime64 (__NR_Linux + 411)
+#define __NR_utimensat_time64 (__NR_Linux + 412)
+#define __NR_pselect6_time64 (__NR_Linux + 413)
+#define __NR_ppoll_time64 (__NR_Linux + 414)
+#define __NR_io_pgetevents_time64 (__NR_Linux + 416)
+#define __NR_recvmmsg_time64 (__NR_Linux + 417)
+#define __NR_mq_timedsend_time64 (__NR_Linux + 418)
+#define __NR_mq_timedreceive_time64 (__NR_Linux + 419)
+#define __NR_semtimedop_time64 (__NR_Linux + 420)
+#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421)
+#define __NR_futex_time64 (__NR_Linux + 422)
+#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423)
+#define __NR_pidfd_send_signal (__NR_Linux + 424)
+#define __NR_io_uring_setup (__NR_Linux + 425)
+#define __NR_io_uring_enter (__NR_Linux + 426)
+#define __NR_io_uring_register (__NR_Linux + 427)
+#define __NR_open_tree (__NR_Linux + 428)
+#define __NR_move_mount (__NR_Linux + 429)
+#define __NR_fsopen (__NR_Linux + 430)
+#define __NR_fsconfig (__NR_Linux + 431)
+#define __NR_fsmount (__NR_Linux + 432)
+#define __NR_fspick (__NR_Linux + 433)
+#define __NR_pidfd_open (__NR_Linux + 434)
+#define __NR_clone3 (__NR_Linux + 435)
+#define __NR_close_range (__NR_Linux + 436)
+#define __NR_openat2 (__NR_Linux + 437)
+#define __NR_pidfd_getfd (__NR_Linux + 438)
+#define __NR_faccessat2 (__NR_Linux + 439)
+#define __NR_process_madvise (__NR_Linux + 440)
+#define __NR_epoll_pwait2 (__NR_Linux + 441)
+#define __NR_mount_setattr (__NR_Linux + 442)
+#define __NR_quotactl_fd (__NR_Linux + 443)
+#define __NR_landlock_create_ruleset (__NR_Linux + 444)
+#define __NR_landlock_add_rule (__NR_Linux + 445)
+#define __NR_landlock_restrict_self (__NR_Linux + 446)
+#define __NR_process_mrelease (__NR_Linux + 448)
+#define __NR_futex_waitv (__NR_Linux + 449)
+#define __NR_set_mempolicy_home_node (__NR_Linux + 450)
+#define __NR_cachestat (__NR_Linux + 451)
+#define __NR_fchmodat2 (__NR_Linux + 452)
/*
* Offset of the last Linux o32 flavoured syscall
*/
-#define __NR_Linux_syscalls 366
+#define __NR_Linux_syscalls 366
#define __NR_O32_Linux 4000
-#define __NR_O32_Linux_syscalls 366
+#define __NR_O32_Linux_syscalls 366
#endif /* __VKI_SCNUMS_MIPS32_LINUX_H */
--
2.45.2

View File

@ -0,0 +1,45 @@
From 468933f9765449c1e353c38e88555a2f1603b9ce Mon Sep 17 00:00:00 2001
From: Andreas Arnez <arnez@linux.ibm.com>
Date: Wed, 15 May 2024 14:32:42 +0200
Subject: [PATCH 07/11] Fix uninitialized `err' in handle_extension()
In handle_extension(), in the case of a second return from SCHEDSETJMP the
variable `err' would be used uninitialized. Fix this by avoiding any
access to `err' in this case.
(cherry picked from commit 94c2e5c6be23c6323f24deacdad5f98fb9f0b1c2)
---
coregrind/m_scheduler/scheduler.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/coregrind/m_scheduler/scheduler.c b/coregrind/m_scheduler/scheduler.c
index fc8cf7c9cb1d..29751bb28283 100644
--- a/coregrind/m_scheduler/scheduler.c
+++ b/coregrind/m_scheduler/scheduler.c
@@ -1233,7 +1233,10 @@ static void handle_extension(ThreadId tid)
SCHEDSETJMP(tid, jumped, err = VG_(client_extension)(tid));
vg_assert(VG_(is_running_thread)(tid));
- if (err != ExtErr_OK) {
+ if (jumped != (UWord)0) {
+ block_signals();
+ VG_(poll_signals)(tid);
+ } else if (err != ExtErr_OK) {
ThreadState* tst = VG_(get_ThreadState)(tid);
Addr addr = tst->arch.vex.guest_IP_AT_SYSCALL;
switch (err) {
@@ -1244,11 +1247,6 @@ static void handle_extension(ThreadId tid)
VG_(core_panic)("scheduler: bad return code from extension");
}
}
-
- if (jumped != (UWord)0) {
- block_signals();
- VG_(poll_signals)(tid);
- }
}
/* tid just requested a jump to the noredir version of its current
--
2.45.2

View File

@ -0,0 +1,31 @@
From 40b68ae8d6c869f098493e3a31d66f09170592e3 Mon Sep 17 00:00:00 2001
From: Andreas Arnez <arnez@linux.ibm.com>
Date: Wed, 15 May 2024 14:32:42 +0200
Subject: [PATCH 08/11] Avoid use of guest_IP_AT_SYSCALL in handle_extension()
The guest state field guest_IP_AT_SYSCALL is referenced in
handle_extension(), even though it may not be defined by all
architectures. Avoid its use altogether.
(cherry picked from commit 16249b21456d681b5d98400287b8dbd926050c75)
---
coregrind/m_scheduler/scheduler.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/coregrind/m_scheduler/scheduler.c b/coregrind/m_scheduler/scheduler.c
index 29751bb28283..cc8d070b7930 100644
--- a/coregrind/m_scheduler/scheduler.c
+++ b/coregrind/m_scheduler/scheduler.c
@@ -1237,8 +1237,7 @@ static void handle_extension(ThreadId tid)
block_signals();
VG_(poll_signals)(tid);
} else if (err != ExtErr_OK) {
- ThreadState* tst = VG_(get_ThreadState)(tid);
- Addr addr = tst->arch.vex.guest_IP_AT_SYSCALL;
+ Addr addr = VG_(get_IP)(tid);
switch (err) {
case ExtErr_Illop:
VG_(synth_sigill)(tid, addr);
--
2.45.2

View File

@ -0,0 +1,66 @@
From ebe5fd9c0aae97767a4418d2f26f3281065b3e6a Mon Sep 17 00:00:00 2001
From: Andreas Arnez <arnez@linux.ibm.com>
Date: Wed, 15 May 2024 14:32:42 +0200
Subject: [PATCH 09/11] s390x: Minor fixes in extension-s390x.c
Some tracker names for registers are not consistent with the naming
scheme. Also, there is a dead assignment to orig_addr2 and orig_len2.
Fix both.
(cherry picked from commit 76f2218924f85547f670969b1a0b59e5200e22ec)
---
coregrind/m_extension/extension-s390x.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/coregrind/m_extension/extension-s390x.c b/coregrind/m_extension/extension-s390x.c
index fd45c7ee948f..735406e6e4c5 100644
--- a/coregrind/m_extension/extension-s390x.c
+++ b/coregrind/m_extension/extension-s390x.c
@@ -37,9 +37,9 @@
#undef SYSNO
-#define READ_FUNCTION_CODE(tst) \
+#define READ_FUNCTION_CODE(tst, extname) \
({ \
- PRE_REG_READ(tst, "func_code", r0, 7, sizeof(UChar)); \
+ PRE_REG_READ(tst, extname "(func_code)", r0, 7, sizeof(UChar)); \
tst->arch.vex.guest_r0 & 0xff; \
})
@@ -141,10 +141,10 @@ static enum ExtensionError do_extension_PRNO(ThreadState* tst, ULong variant)
{
UChar r1 = variant & 0xf;
UChar r2 = (variant >> 4) & 0xf;
- UChar func = READ_FUNCTION_CODE(tst);
+ UChar func = READ_FUNCTION_CODE(tst, "PRNO");
UChar fc = func & 0x7f;
UChar mflag = func & 128;
- ULong parms = READ_GPR(tst, "r1", 1);
+ ULong parms = READ_GPR(tst, "PRNO(r1)", 1);
ULong parms_len;
Int cc = 0;
ULong orig_addr1 = 0, orig_len1 = 0, orig_addr2 = 0, orig_len2 = 0;
@@ -175,8 +175,8 @@ static enum ExtensionError do_extension_PRNO(ThreadState* tst, ULong variant)
PRE_MEM_WRITE(tst, "PRNO(op1)", addr1, len1);
} else {
// Seed operation
- addr2 = orig_addr2 = READ_GPR(tst, "PRNO(op2_addr)", r2);
- len2 = orig_len2 = READ_GPR(tst, "PRNO(op2_len)", r2 + 1);
+ addr2 = READ_GPR(tst, "PRNO(op2_addr)", r2);
+ len2 = READ_GPR(tst, "PRNO(op2_len)", r2 + 1);
PRE_MEM_READ(tst, "PRNO(op2)", addr2, len2);
}
PRE_MEM_WRITE(tst, "PRNO(parms)", parms, parms_len);
@@ -474,7 +474,7 @@ static enum ExtensionError do_extension_NNPA(ThreadState* tst, ULong variant)
{
ULong gpr0 = READ_GPR(tst, "NNPA(r0)", 0);
UChar fc = gpr0 & 0x7f;
- ULong parms_addr = READ_GPR(tst, "r1", 1);
+ ULong parms_addr = READ_GPR(tst, "NNPA(r1)", 1);
Int cc = 0;
ULong parms_len;
--
2.45.2

View File

@ -0,0 +1,38 @@
From 70d765faa162f2f12e7771db51877649637f2c12 Mon Sep 17 00:00:00 2001
From: Jesus Checa <jcheca@redhat.com>
Date: Sat, 25 May 2024 12:40:30 +0200
Subject: [PATCH 10/11] Bug 453044 - gbserver_tests failures in aarch64
(cherry picked from commit 790abdf7d3f3df0c968605b68ca765310689b7ce)
---
NEWS | 1 +
gdbserver_tests/filter_gdb.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/NEWS b/NEWS
index adb52169dd87..c2ad6a207d96 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Branch 3.23
The following bugs have been fixed or resolved on this branch.
+453044 gbserver_tests failures in aarch64
486180 [MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
486293 memccpy false positives
486569 linux inotify_init syscall wrapper missing POST entry in syscall_table
diff --git a/gdbserver_tests/filter_gdb.in b/gdbserver_tests/filter_gdb.in
index 4118063f6bc6..497171732b25 100755
--- a/gdbserver_tests/filter_gdb.in
+++ b/gdbserver_tests/filter_gdb.in
@@ -152,6 +152,7 @@ s/in _select ()/in syscall .../
/sysv\/linux\/generic\/select.c/d
/return SYSCALL_CANCEL /d
/r = SYSCALL_CANCEL /d
+/result = SYSCALL_CANCEL /d
# a more specialised system call select stack trace part
# (on 32 bits, we have an int_80, on 64 bits, directly select)
--
2.45.2

View File

@ -0,0 +1,56 @@
From 1c2cdfd790b3e26f47e709770bdefd456d83a7cb Mon Sep 17 00:00:00 2001
From: Paul Floyd <pjfloyd@wanadoo.fr>
Date: Tue, 4 Jun 2024 12:49:33 +0200
Subject: [PATCH 11/11] Linux regtest: reallocarray needs malloc.h
Seen on Rocky 8.9
(cherry picked from commit a015ad2e0db40076b4841220c7ab6d6853798936)
---
memcheck/tests/amd64-linux/reallocarray.c | 1 +
memcheck/tests/amd64-linux/reallocarray.stderr.exp | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/memcheck/tests/amd64-linux/reallocarray.c b/memcheck/tests/amd64-linux/reallocarray.c
index 8765ca4997cb..ce63b80100da 100644
--- a/memcheck/tests/amd64-linux/reallocarray.c
+++ b/memcheck/tests/amd64-linux/reallocarray.c
@@ -2,6 +2,7 @@
#include <assert.h>
#include <errno.h>
#include <stdint.h>
+#include <malloc.h>
#include "../../memcheck.h"
int main(void)
diff --git a/memcheck/tests/amd64-linux/reallocarray.stderr.exp b/memcheck/tests/amd64-linux/reallocarray.stderr.exp
index a1c8439cc9ef..20a1c4e8b4f9 100644
--- a/memcheck/tests/amd64-linux/reallocarray.stderr.exp
+++ b/memcheck/tests/amd64-linux/reallocarray.stderr.exp
@@ -12,19 +12,19 @@ To see them, rerun with: --leak-check=full --show-leak-kinds=all
realloc() with size 0
at 0x........: reallocarray (vg_replace_malloc.c:...)
- by 0x........: main (reallocarray.c:13)
+ by 0x........: main (reallocarray.c:14)
Address 0x........ is 0 bytes inside a block of size 40 alloc'd
at 0x........: reallocarray (vg_replace_malloc.c:...)
- by 0x........: main (reallocarray.c:11)
+ by 0x........: main (reallocarray.c:12)
All heap blocks were freed -- no leaks are possible
realloc() with size 0
at 0x........: reallocarray (vg_replace_malloc.c:...)
- by 0x........: main (reallocarray.c:16)
+ by 0x........: main (reallocarray.c:17)
Address 0x........ is 0 bytes inside a block of size 10 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (reallocarray.c:15)
+ by 0x........: main (reallocarray.c:16)
All heap blocks were freed -- no leaks are possible
--
2.45.2

View File

@ -0,0 +1,184 @@
From e62c7b4f9ee0a8c20c7211a92ad512f925e9515c Mon Sep 17 00:00:00 2001
From: Paul Floyd <pjfloyd@wanadoo.fr>
Date: Sun, 16 Jun 2024 09:25:51 +0200
Subject: [PATCH 12/15] Bug 487439 - SIGILL in JDK11, JDK17
(cherry picked from commit c19d19d34a6dadaf4a9d590f516f813e9cbacdd0)
---
.gitignore | 1 +
NEWS | 1 +
VEX/priv/guest_amd64_toIR.c | 2 +-
none/tests/amd64/Makefile.am | 3 +
none/tests/amd64/bug487439.cpp | 83 +++++++++++++++++++++++++++
none/tests/amd64/bug487439.stderr.exp | 0
none/tests/amd64/bug487439.stdout.exp | 1 +
none/tests/amd64/bug487439.vgtest | 2 +
8 files changed, 92 insertions(+), 1 deletion(-)
create mode 100644 none/tests/amd64/bug487439.cpp
create mode 100644 none/tests/amd64/bug487439.stderr.exp
create mode 100644 none/tests/amd64/bug487439.stdout.exp
create mode 100644 none/tests/amd64/bug487439.vgtest
diff --git a/NEWS b/NEWS
index c2ad6a207d96..fbe0f012ef0c 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ The following bugs have been fixed or resolved on this branch.
486180 [MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
486293 memccpy false positives
486569 linux inotify_init syscall wrapper missing POST entry in syscall_table
+487439 SIGILL in JDK11, JDK17
n-i-bz aarch64 frinta and frinta vector instructions
To see details of a given bug, visit
diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c
index f0b1c5516267..28c37f092211 100644
--- a/VEX/priv/guest_amd64_toIR.c
+++ b/VEX/priv/guest_amd64_toIR.c
@@ -14138,7 +14138,7 @@ Long dis_ESC_0F__SSE2 ( Bool* decode_OK,
goto decode_success;
}
/* 66 0F 73 /6 ib = PSLLQ by immediate */
- if (have66noF2noF3(pfx) && sz == 2
+ if (have66noF2noF3(pfx) && (sz == 2 || /* ignore redundant REX.W */ sz == 8)
&& epartIsReg(getUChar(delta))
&& gregLO3ofRM(getUChar(delta)) == 6) {
delta = dis_SSE_shiftE_imm( pfx, delta, "psllq", Iop_ShlN64x2 );
diff --git a/none/tests/amd64/Makefile.am b/none/tests/amd64/Makefile.am
index dc0498018209..83029c15590c 100644
--- a/none/tests/amd64/Makefile.am
+++ b/none/tests/amd64/Makefile.am
@@ -44,6 +44,7 @@ EXTRA_DIST = \
bug156404-amd64.vgtest bug156404-amd64.stdout.exp \
bug156404-amd64.stderr.exp \
bug485148.vgtest bug485148.stdout.exp bug485148.stderr.exp \
+ bug487439.vgtest bug487439.stdout.exp bug487439.stderr.exp \
cet_nops.vgtest cet_nops.stdout.exp cet_nops.stderr.exp \
clc.vgtest clc.stdout.exp clc.stderr.exp \
crc32.vgtest crc32.stdout.exp crc32.stderr.exp \
@@ -107,6 +108,7 @@ check_PROGRAMS = \
amd64locked \
bt_flags \
bug127521-64 bug132813-amd64 bug132918 bug137714-amd64 \
+ bug487439 \
cet_nops \
clc \
cmpxchg \
@@ -204,6 +206,7 @@ amd64locked_CFLAGS = $(AM_CFLAGS) -O
bug132918_LDADD = -lm
bug485148_CXXFLAGS = ${AM_CXXFLAGS} -mfma
bug485148_SOURCES = bug485148.cpp
+bug487439_SOURCES = bug487439.cpp
cmpxchg_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
fb_test_amd64_CFLAGS = $(AM_CFLAGS) -O -fno-strict-aliasing
fb_test_amd64_LDADD = -lm
diff --git a/none/tests/amd64/bug487439.cpp b/none/tests/amd64/bug487439.cpp
new file mode 100644
index 000000000000..f86bb65ce9eb
--- /dev/null
+++ b/none/tests/amd64/bug487439.cpp
@@ -0,0 +1,83 @@
+// This is more or less a copy/paste from the generated insn_sse2.c
+// I didn't want to mess with the perl generator because
+// GCC and clang don't agree on the asm syntax
+// Using the rex prefix looks like a bug or misfeature in OpenJDK
+// so I'm assuming that this is a one-off and not a general issue
+
+#include <iostream>
+#include <csetjmp>
+#include <csignal>
+
+union reg128_t {
+ char sb[16];
+ unsigned char ub[16];
+ short sw[8];
+ unsigned short uw[8];
+ int sd[4];
+ unsigned int ud[4];
+ long long int sq[2];
+ unsigned long long int uq[2];
+ float ps[4];
+ double pd[2];
+} __attribute__ ((aligned (16)));
+
+static sigjmp_buf catchpoint;
+
+static void handle_sigill(int signum)
+{
+ siglongjmp(catchpoint, 1);
+}
+
+/* with redundant rex.W */
+static void psllq_4(void)
+{
+ reg128_t arg1 = { .uq = { 0x0123456789abcdefULL, 0x0123456789abcdefULL } };
+ reg128_t result0;
+ char state[108];
+
+ if (sigsetjmp(catchpoint, 1) == 0)
+ {
+ asm(
+ "ffree %%st(7)\n"
+ "ffree %%st(6)\n"
+ "ffree %%st(5)\n"
+ "ffree %%st(4)\n"
+ "movlps %2, %%xmm1\n"
+ "movhps %3, %%xmm1\n"
+ // only GCC
+ //".rex.W psllq $12, %%xmm1\n"
+ // only clang
+ //"data16 rex64 psllq $12, %mm1\n"
+ ".byte 0x66,0x48,0x0f,0x73,0xf1,0x0c\n"
+ "movlps %%xmm1, %0\n"
+ "movhps %%xmm1, %1\n"
+ "cld\n"
+ : "=m" (result0.uq[0]), "=m" (result0.uq[1])
+ : "m" (arg1.uq[0]), "m" (arg1.uq[1]), "m" (state[0])
+ : "xmm1"
+ );
+
+ if (result0.uq[0] == 0x3456789abcdef000ULL && result0.uq[1] == 0x3456789abcdef000ULL )
+ {
+ std::cout << "psllq_4 ... ok\n";
+ }
+ else
+ {
+ std::cout << "psllq_4 ... not ok\n";
+ std::cout << " result0.uq[0] = " << result0.uq[0] << " (expected " << 0x3456789abcdef000ULL << ")\n";
+ std::cout << " result0.uq[1] = " << result0.uq[1] << " (expected " << 0x3456789abcdef000ULL << ")\n";
+ }
+ }
+ else
+ {
+ std::cout << "psllq_4 ... failed\n";
+ }
+
+ return;
+}
+
+int main()
+{
+ signal(SIGILL, handle_sigill);
+ psllq_4();
+}
diff --git a/none/tests/amd64/bug487439.stderr.exp b/none/tests/amd64/bug487439.stderr.exp
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/none/tests/amd64/bug487439.stdout.exp b/none/tests/amd64/bug487439.stdout.exp
new file mode 100644
index 000000000000..065b518a27d7
--- /dev/null
+++ b/none/tests/amd64/bug487439.stdout.exp
@@ -0,0 +1 @@
+psllq_4 ... ok
diff --git a/none/tests/amd64/bug487439.vgtest b/none/tests/amd64/bug487439.vgtest
new file mode 100644
index 000000000000..3faa1ed6b014
--- /dev/null
+++ b/none/tests/amd64/bug487439.vgtest
@@ -0,0 +1,2 @@
+prog: bug487439
+vgopts: -q
--
2.45.2

View File

@ -0,0 +1,226 @@
From 14cefe7c645a3148165f4b2fa6095d9446e378c7 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sun, 16 Jun 2024 21:23:08 +0200
Subject: [PATCH 13/15] Don't leave fds created with --log-file, --xml-file or
--log-socket open
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
prepare_sink_fd and prepare_sink_socket will create a new file
descriptor for the output sink. finalize_sink_fd then copies the fd
to the safe range, so it doesn't conflict with any application fds.
If we created the original fd ourselves, it was a VgLogTo_File or
VgLogTo_Socket, not VgLogTo_Fd, finalize_sink_fd should close it.
Also close socket when connecting fails in VG_(connect_via_socket).
Add a testcase for --log-file and --xml-file which prints output to
/dev/stderr
https://bugs.kde.org/show_bug.cgi?id=202770
https://bugs.kde.org/show_bug.cgi?id=311655
https://bugs.kde.org/show_bug.cgi?id=488379
Co-authored-by: Alexandra Hájková <ahajkova@redhat.com
(cherry picked from commit fbd7596f8342f0b0fbbe088d960da839a8bdb839)
---
NEWS | 3 ++
coregrind/m_libcfile.c | 1 +
coregrind/m_libcprint.c | 6 ++++
none/tests/Makefile.am | 5 ++-
none/tests/filter_xml | 25 +++++++++++++++
none/tests/log-track-fds.stderr.exp | 0
none/tests/log-track-fds.vgtest | 4 +++
none/tests/xml-track-fds.stderr.exp | 47 +++++++++++++++++++++++++++++
none/tests/xml-track-fds.vgtest | 5 +++
9 files changed, 95 insertions(+), 1 deletion(-)
create mode 100755 none/tests/filter_xml
create mode 100644 none/tests/log-track-fds.stderr.exp
create mode 100644 none/tests/log-track-fds.vgtest
create mode 100644 none/tests/xml-track-fds.stderr.exp
create mode 100644 none/tests/xml-track-fds.vgtest
diff --git a/NEWS b/NEWS
index fbe0f012ef0c..10b5ae3195ca 100644
--- a/NEWS
+++ b/NEWS
@@ -5,11 +5,14 @@ Branch 3.23
The following bugs have been fixed or resolved on this branch.
+202770 open fd at exit --log-socket=127.0.0.1:1500 with --track-fds=yes
+311655 --log-file=FILE leads to apparent fd leak
453044 gbserver_tests failures in aarch64
486180 [MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
486293 memccpy false positives
486569 linux inotify_init syscall wrapper missing POST entry in syscall_table
487439 SIGILL in JDK11, JDK17
+488379 --track-fds=yes errors that cannot be suppressed with --xml-file=
n-i-bz aarch64 frinta and frinta vector instructions
To see details of a given bug, visit
diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c
index 6098bc5813a8..9635b80a6869 100644
--- a/coregrind/m_libcfile.c
+++ b/coregrind/m_libcfile.c
@@ -1333,6 +1333,7 @@ Int VG_(connect_via_socket)( const HChar* str )
res = my_connect(sd, &servAddr, sizeof(servAddr));
if (res < 0) {
/* connection failed */
+ VG_(close)(sd);
return -2;
}
diff --git a/coregrind/m_libcprint.c b/coregrind/m_libcprint.c
index c802f814038b..593889da9d1b 100644
--- a/coregrind/m_libcprint.c
+++ b/coregrind/m_libcprint.c
@@ -425,6 +425,12 @@ static void finalize_sink_fd(OutputSink *sink, Int new_fd, Bool is_xml)
} else {
VG_(fcntl)(safe_fd, VKI_F_SETFD, VKI_FD_CLOEXEC);
sink->fd = safe_fd;
+ /* If we created the new_fd (VgLogTo_File or VgLogTo_Socket), then we
+ don't need the original file descriptor open anymore. We only need
+ to keep it open if it was an existing fd given by the user (or
+ stderr). */
+ if (sink->type != VgLogTo_Fd)
+ VG_(close)(new_fd);
}
}
diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am
index 185993f204bb..532cc7632a8f 100644
--- a/none/tests/Makefile.am
+++ b/none/tests/Makefile.am
@@ -86,6 +86,7 @@ dist_noinst_SCRIPTS = \
filter_none_discards \
filter_stderr \
filter_timestamp \
+ filter_xml \
allexec_prepare_prereq
noinst_HEADERS = fdleak.h
@@ -229,7 +230,9 @@ EXTRA_DIST = \
sigprocmask.stderr.exp sigprocmask.vgtest \
socket_close.stderr.exp socket_close.vgtest \
file_dclose.stderr.exp file_dclose.vgtest \
- double_close_range.stderr.exp double_close_range.vgtest
+ double_close_range.stderr.exp double_close_range.vgtest \
+ log-track-fds.stderr.exp log-track-fds.vgtest \
+ xml-track-fds.stderr.exp xml-track-fds.vgtest
check_PROGRAMS = \
diff --git a/none/tests/filter_xml b/none/tests/filter_xml
new file mode 100755
index 000000000000..d1ef570a05b0
--- /dev/null
+++ b/none/tests/filter_xml
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+dir=`dirname $0`
+
+# FreeBSD adds this one extra line
+# but after filter_xml_frames it will just be <path>...<\/path>
+# which matches other lines, so get rid of it while we can
+# uniquely match it
+sed "/<path>internet<\/path>/d" |
+
+$dir/../../tests/filter_xml_frames |
+perl -p -e "s/<time>.*<\/time>/<time>...<\/time>/s" |
+perl -p -e "s/<what>.*<\/what>/<what>...<\/what>/s" |
+perl -p -e "s/<path>.*<\/path>/<path>...<\/path>/s" |
+perl -p -e "s/<line>Copyright.*<\/line>/<line>Copyright...<\/line>/s" |
+perl -p -e "s/<line>Using Valgrind.*<\/line>/<line>Using Valgrind...<\/line>/s" |
+sed "s/<ppid>[0-9]*<\/ppid>/<ppid>...<\/ppid>/" |
+sed "s/<tid>[0-9]*<\/tid>/<tid>...<\/tid>/" |
+sed "s/<pid>[0-9]*<\/pid>/<pid>...<\/pid>/" |
+sed "s/<obj>.*<\/obj>/<obj>...<\/obj>/" |
+sed "s/<exe>.*<\/exe>/<exe>...<\/exe>/" |
+sed "s/<dir>.*<\/dir>/<dir>...<\/dir>/" |
+sed "s/<ppid>[0-9]*<\/ppid>/<ppid>...<\/ppid>/" |
+sed "s/<unique>0x[0-9a-fA-F]*<\/unique>/<unique>0x........<\/unique>/" |
+sed "s/<ip>0x[0-9a-fA-F]*<\/ip>/<ip>0x........<\/ip>/"
diff --git a/none/tests/log-track-fds.stderr.exp b/none/tests/log-track-fds.stderr.exp
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/none/tests/log-track-fds.vgtest b/none/tests/log-track-fds.vgtest
new file mode 100644
index 000000000000..dfebb5bf3e8e
--- /dev/null
+++ b/none/tests/log-track-fds.vgtest
@@ -0,0 +1,4 @@
+# Simple test to make sure track-fds doesn't error on (internal) log-file
+# See https://bugs.kde.org/show_bug.cgi?id=311655
+prog: ../../tests/true
+vgopts: -q --track-fds=yes --log-file=/dev/stderr
diff --git a/none/tests/xml-track-fds.stderr.exp b/none/tests/xml-track-fds.stderr.exp
new file mode 100644
index 000000000000..b06da9d72252
--- /dev/null
+++ b/none/tests/xml-track-fds.stderr.exp
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+
+<valgrindoutput>
+
+<protocolversion>5</protocolversion>
+<protocoltool>none</protocoltool>
+
+<preamble>
+ <line>Nulgrind, the minimal Valgrind tool</line>
+ <line>Copyright...</line>
+ <line>Using Valgrind...</line>
+ <line>Command: ./../../tests/true</line>
+</preamble>
+
+<pid>...</pid>
+<ppid>...</ppid>
+<tool>none</tool>
+
+<args>
+ <vargv>
+ <exe>...</exe>
+ <arg>--command-line-only=yes</arg>
+ <arg>--memcheck:leak-check=no</arg>
+ <arg>--tool=none</arg>
+ <arg>--track-fds=yes</arg>
+ <arg>--xml=yes</arg>
+ <arg>--xml-file=/dev/stderr</arg>
+ </vargv>
+ <argv>
+ <exe>...</exe>
+ </argv>
+</args>
+
+<status>
+ <state>RUNNING</state>
+ <time>...</time>
+</status>
+
+
+<status>
+ <state>FINISHED</state>
+ <time>...</time>
+</status>
+
+
+</valgrindoutput>
+
diff --git a/none/tests/xml-track-fds.vgtest b/none/tests/xml-track-fds.vgtest
new file mode 100644
index 000000000000..50f1a55a82f3
--- /dev/null
+++ b/none/tests/xml-track-fds.vgtest
@@ -0,0 +1,5 @@
+# Simple test to make sure track-fds doesn't error on (internal) xml-file
+# See https://bugs.kde.org/show_bug.cgi?id=488379
+prog: ../../tests/true
+vgopts: --track-fds=yes --xml=yes --xml-file=/dev/stderr
+stderr_filter: filter_xml
--
2.45.2

View File

@ -0,0 +1,138 @@
From 0ced5269236c527d2e288b773e3684b6b1673ec2 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Mon, 17 Jun 2024 00:27:12 +0200
Subject: [PATCH 14/15] Close both internal pipe fds after VG_(fork) in parent
and child
An VG_fork() creates a pipe between parent and child to syncronize the
two processes. The parent wants to register the child pid before the
child can run. This is done in register_sigchld_ignore.
Make sure both the parent and the child close both the read and write
file descriptors so none leak.
https://bugs.kde.org/show_bug.cgi?id=479661
(cherry picked from commit 1263471efdf8405cb0f1a767c6af73bf2eaf7160)
---
NEWS | 1 +
coregrind/m_libcproc.c | 7 +++++++
none/tests/Makefile.am | 3 +++
none/tests/track-fds-exec-children.c | 13 +++++++++++++
none/tests/track-fds-exec-children.stderr.exp | 0
none/tests/track-fds-exec-children.vgtest | 3 +++
6 files changed, 27 insertions(+)
create mode 100644 none/tests/track-fds-exec-children.c
create mode 100644 none/tests/track-fds-exec-children.stderr.exp
create mode 100644 none/tests/track-fds-exec-children.vgtest
diff --git a/NEWS b/NEWS
index 10b5ae3195ca..94789a04ba9e 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ The following bugs have been fixed or resolved on this branch.
202770 open fd at exit --log-socket=127.0.0.1:1500 with --track-fds=yes
311655 --log-file=FILE leads to apparent fd leak
453044 gbserver_tests failures in aarch64
+479661 Valgrind leaks file descriptors
486180 [MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
486293 memccpy false positives
486569 linux inotify_init syscall wrapper missing POST entry in syscall_table
diff --git a/coregrind/m_libcproc.c b/coregrind/m_libcproc.c
index 11dabe768f59..8422e9d1187a 100644
--- a/coregrind/m_libcproc.c
+++ b/coregrind/m_libcproc.c
@@ -905,6 +905,8 @@ static void register_sigchld_ignore ( Int pid, Int fds[2])
return;
if (pid == 0) {
+ /* We are the child, close writing fd that we don't use. */
+ VG_(close)(fds[1]);
/* Before proceeding, ensure parent has recorded child PID in map
of SIGCHLD to ignore */
while (child_wait == 1)
@@ -916,6 +918,7 @@ static void register_sigchld_ignore ( Int pid, Int fds[2])
}
}
+ /* Now close reading fd. */
VG_(close)(fds[0]);
return;
}
@@ -926,11 +929,15 @@ static void register_sigchld_ignore ( Int pid, Int fds[2])
ht_sigchld_ignore = VG_(HT_construct)("ht.sigchld.ignore");
VG_(HT_add_node)(ht_sigchld_ignore, n);
+ /* We are the parent process, close read fd that we don't use. */
+ VG_(close)(fds[0]);
+
child_wait = 0;
if (VG_(write)(fds[1], &child_wait, sizeof(Int)) <= 0)
VG_(message)(Vg_DebugMsg,
"warning: Unable to record PID of internal process (write)\n");
+ /* Now close writing fd. */
VG_(close)(fds[1]);
}
diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am
index 532cc7632a8f..1751ad3fa2e5 100644
--- a/none/tests/Makefile.am
+++ b/none/tests/Makefile.am
@@ -223,6 +223,7 @@ EXTRA_DIST = \
threadederrno.vgtest \
timestamp.stderr.exp timestamp.vgtest \
tls.vgtest tls.stderr.exp tls.stdout.exp \
+ track-fds-exec-children.vgtest track-fds-exec-children.stderr.exp \
unit_debuglog.stderr.exp unit_debuglog.vgtest \
vgprintf.stderr.exp vgprintf.vgtest \
vgprintf_nvalgrind.stderr.exp vgprintf_nvalgrind.vgtest \
@@ -276,6 +277,7 @@ check_PROGRAMS = \
tls \
tls.so \
tls2.so \
+ track-fds-exec-children \
unit_debuglog \
valgrind_cpp_test \
vgprintf \
@@ -414,6 +416,7 @@ if VGCONF_OS_IS_DARWIN
else
tls2_so_LDFLAGS = -shared
endif
+track_fds_exec_children_SOURCES = track-fds-exec-children.c
vgprintf_nvalgrind_SOURCES = vgprintf.c
vgprintf_nvalgrind_CFLAGS = ${AM_CFLAGS} -DNVALGRIND
diff --git a/none/tests/track-fds-exec-children.c b/none/tests/track-fds-exec-children.c
new file mode 100644
index 000000000000..7209ee73d5b7
--- /dev/null
+++ b/none/tests/track-fds-exec-children.c
@@ -0,0 +1,13 @@
+#include <unistd.h>
+#include <sys/wait.h>
+
+int main()
+{
+ pid_t pid = fork ();
+ if (pid == 0)
+ execlp("true", "true", NULL);
+
+ // Wait till true succeeds
+ wait (NULL);
+ return 0;
+}
diff --git a/none/tests/track-fds-exec-children.stderr.exp b/none/tests/track-fds-exec-children.stderr.exp
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/none/tests/track-fds-exec-children.vgtest b/none/tests/track-fds-exec-children.vgtest
new file mode 100644
index 000000000000..aa926a6290ed
--- /dev/null
+++ b/none/tests/track-fds-exec-children.vgtest
@@ -0,0 +1,3 @@
+env: DEBUGINFOD_URLS=file:/dev/null
+prog: track-fds-exec-children
+vgopts: -q --track-fds=yes --trace-children=yes
--
2.45.2

View File

@ -0,0 +1,58 @@
From 2272233d23a5431e14b3c9385d2b4b66e0e8f0fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= <ahajkova@redhat.com>
Date: Thu, 20 Jun 2024 07:45:56 -0400
Subject: [PATCH 15/15] Don't allow programs calling fnctl on valgrind's own
file descriptors
Add a call to ML_(fd_allowed) in the PRE handler of fcntl and fcntl64
and block syscalls with EBADF when the file descriptor isn't allowed
to be used by the program.
https://bugs.kde.org/show_bug.cgi?id=337388
(cherry picked from commit 4b83e3d47daaf5eff2ca96867a8c790e13830eb5)
---
NEWS | 1 +
coregrind/m_syswrap/syswrap-linux.c | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/NEWS b/NEWS
index 94789a04ba9e..523380a98fe5 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ The following bugs have been fixed or resolved on this branch.
202770 open fd at exit --log-socket=127.0.0.1:1500 with --track-fds=yes
311655 --log-file=FILE leads to apparent fd leak
+337388 fcntl works on Valgrind's own file descriptors
453044 gbserver_tests failures in aarch64
479661 Valgrind leaks file descriptors
486180 [MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
index 45413fdd9ef5..9f3c51c17948 100644
--- a/coregrind/m_syswrap/syswrap-linux.c
+++ b/coregrind/m_syswrap/syswrap-linux.c
@@ -6978,6 +6978,10 @@ PRE(sys_fcntl)
if (ARG2 == VKI_F_SETLKW)
# endif
*flags |= SfMayBlock;
+
+ if (!ML_(fd_allowed)(ARG1, "fcntl", tid, False)) {
+ SET_STATUS_Failure (VKI_EBADF);
+ }
}
POST(sys_fcntl)
@@ -7088,6 +7092,10 @@ PRE(sys_fcntl64)
if (ARG2 == VKI_F_SETLKW)
# endif
*flags |= SfMayBlock;
+
+ if (!ML_(fd_allowed)(ARG1, "fcntl64", tid, False)) {
+ SET_STATUS_Failure (VKI_EBADF);
+ }
}
POST(sys_fcntl64)
--
2.45.2

View File

@ -0,0 +1,176 @@
From e1868cb600ce8f93f61c0c4cd692eba77396b492 Mon Sep 17 00:00:00 2001
From: Petar Jovanovic <mips32r2@gmail.com>
Date: Mon, 24 Jun 2024 10:33:46 +0000
Subject: [PATCH 16/21] mips: skip using shared syscall numbers for mips64
mips does not use shared syscall numbers, so we can not use
vki-scnums-shared-linux.h.
This fixes KDE #444781.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Aleksandar Rikalo <arikalo@gmail.com>
(cherry picked from commit efaa17e53a750d5f0f4c138b507b1b104729ed67)
---
NEWS | 1 +
coregrind/m_syswrap/syswrap-mips64-linux.c | 1 +
include/pub_tool_vkiscnums_asm.h | 1 -
include/vki/vki-scnums-mips64-linux.h | 98 ++++++++++++++++++++++
4 files changed, 100 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index 523380a98fe5..9f4f69744086 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ The following bugs have been fixed or resolved on this branch.
202770 open fd at exit --log-socket=127.0.0.1:1500 with --track-fds=yes
311655 --log-file=FILE leads to apparent fd leak
337388 fcntl works on Valgrind's own file descriptors
+444781 MIPS: wrong syscall numbers used
453044 gbserver_tests failures in aarch64
479661 Valgrind leaks file descriptors
486180 [MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c
index 24f2bcc93956..b07b7da459e6 100644
--- a/coregrind/m_syswrap/syswrap-mips64-linux.c
+++ b/coregrind/m_syswrap/syswrap-mips64-linux.c
@@ -813,6 +813,7 @@ static SyscallTableEntry syscall_main_table[] = {
LINX_ (__NR_pwritev2, sys_pwritev2),
LINX_ (__NR_syncfs, sys_syncfs),
LINXY (__NR_statx, sys_statx),
+ GENX_ (__NR_rseq, sys_ni_syscall),
LINX_ (__NR_setns, sys_setns),
LINXY (__NR_io_uring_setup, sys_io_uring_setup),
LINXY (__NR_io_uring_enter, sys_io_uring_enter),
diff --git a/include/pub_tool_vkiscnums_asm.h b/include/pub_tool_vkiscnums_asm.h
index d3d7dc19be9d..f97a3af3a19c 100644
--- a/include/pub_tool_vkiscnums_asm.h
+++ b/include/pub_tool_vkiscnums_asm.h
@@ -70,7 +70,6 @@
# include "vki/vki-scnums-shared-linux.h"
#elif defined(VGP_mips64_linux)
-# include "vki/vki-scnums-shared-linux.h"
# include "vki/vki-scnums-mips64-linux.h"
#elif defined(VGP_x86_freebsd) || defined(VGP_amd64_freebsd) || defined(VGP_arm64_freebsd)
diff --git a/include/vki/vki-scnums-mips64-linux.h b/include/vki/vki-scnums-mips64-linux.h
index 1ae7a5dbec7a..c5291e31c654 100644
--- a/include/vki/vki-scnums-mips64-linux.h
+++ b/include/vki/vki-scnums-mips64-linux.h
@@ -362,6 +362,45 @@
#define __NR_pkey_alloc (__NR_Linux + 324)
#define __NR_pkey_free (__NR_Linux + 325)
#define __NR_statx (__NR_Linux + 326)
+#define __NR_rseq (__NR_Linux + 327)
+#define __NR_io_pgetevents (__NR_Linux + 328)
+#define __NR_pidfd_send_signal (__NR_Linux + 424)
+#define __NR_io_uring_setup (__NR_Linux + 425)
+#define __NR_io_uring_enter (__NR_Linux + 426)
+#define __NR_io_uring_register (__NR_Linux + 427)
+#define __NR_open_tree (__NR_Linux + 428)
+#define __NR_move_mount (__NR_Linux + 429)
+#define __NR_fsopen (__NR_Linux + 430)
+#define __NR_fsconfig (__NR_Linux + 431)
+#define __NR_fsmount (__NR_Linux + 432)
+#define __NR_fspick (__NR_Linux + 433)
+#define __NR_pidfd_open (__NR_Linux + 434)
+#define __NR_clone3 (__NR_Linux + 435)
+#define __NR_close_range (__NR_Linux + 436)
+#define __NR_openat2 (__NR_Linux + 437)
+#define __NR_pidfd_getfd (__NR_Linux + 438)
+#define __NR_faccessat2 (__NR_Linux + 439)
+#define __NR_process_madvise (__NR_Linux + 440)
+#define __NR_epoll_pwait2 (__NR_Linux + 441)
+#define __NR_mount_setattr (__NR_Linux + 442)
+#define __NR_quotactl_fd (__NR_Linux + 443)
+#define __NR_landlock_create_ruleset (__NR_Linux + 444)
+#define __NR_landlock_add_rule (__NR_Linux + 445)
+#define __NR_landlock_restrict_self (__NR_Linux + 446)
+#define __NR_process_mrelease (__NR_Linux + 448)
+#define __NR_futex_waitv (__NR_Linux + 449)
+#define __NR_set_mempolicy_home_node (__NR_Linux + 450)
+#define __NR_cachestat (__NR_Linux + 451)
+#define __NR_fchmodat2 (__NR_Linux + 452)
+#define __NR_map_shadow_stack (__NR_Linux + 453)
+#define __NR_futex_wake (__NR_Linux + 454)
+#define __NR_futex_wait (__NR_Linux + 455)
+#define __NR_futex_requeue (__NR_Linux + 456)
+#define __NR_statmount (__NR_Linux + 457)
+#define __NR_listmount (__NR_Linux + 458)
+#define __NR_lsm_get_self_attr (__NR_Linux + 459)
+#define __NR_lsm_set_self_attr (__NR_Linux + 460)
+#define __NR_lsm_list_modules (__NR_Linux + 461)
#elif defined(VGABI_N32)
@@ -701,6 +740,65 @@
#define __NR_pkey_alloc (__NR_Linux + 328)
#define __NR_pkey_free (__NR_Linux + 329)
#define __NR_statx (__NR_Linux + 330)
+#define __NR_rseq (__NR_Linux + 331)
+#define __NR_io_pgetevents (__NR_Linux + 332)
+#define __NR_clock_gettime64 (__NR_Linux + 403)
+#define __NR_clock_settime64 (__NR_Linux + 404)
+#define __NR_clock_adjtime64 (__NR_Linux + 405)
+#define __NR_clock_getres_time64 (__NR_Linux + 406)
+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407)
+#define __NR_timer_gettime64 (__NR_Linux + 408)
+#define __NR_timer_settime64 (__NR_Linux + 409)
+#define __NR_timerfd_gettime64 (__NR_Linux + 410)
+#define __NR_timerfd_settime64 (__NR_Linux + 411)
+#define __NR_utimensat_time64 (__NR_Linux + 412)
+#define __NR_pselect6_time64 (__NR_Linux + 413)
+#define __NR_ppoll_time64 (__NR_Linux + 414)
+#define __NR_io_pgetevents_time64 (__NR_Linux + 416)
+#define __NR_recvmmsg_time64 (__NR_Linux + 417)
+#define __NR_mq_timedsend_time64 (__NR_Linux + 418)
+#define __NR_mq_timedreceive_time64 (__NR_Linux + 419)
+#define __NR_semtimedop_time64 (__NR_Linux + 420)
+#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421)
+#define __NR_futex_time64 (__NR_Linux + 422)
+#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423)
+#define __NR_pidfd_send_signal (__NR_Linux + 424)
+#define __NR_io_uring_setup (__NR_Linux + 425)
+#define __NR_io_uring_enter (__NR_Linux + 426)
+#define __NR_io_uring_register (__NR_Linux + 427)
+#define __NR_open_tree (__NR_Linux + 428)
+#define __NR_move_mount (__NR_Linux + 429)
+#define __NR_fsopen (__NR_Linux + 430)
+#define __NR_fsconfig (__NR_Linux + 431)
+#define __NR_fsmount (__NR_Linux + 432)
+#define __NR_fspick (__NR_Linux + 433)
+#define __NR_pidfd_open (__NR_Linux + 434)
+#define __NR_clone3 (__NR_Linux + 435)
+#define __NR_close_range (__NR_Linux + 436)
+#define __NR_openat2 (__NR_Linux + 437)
+#define __NR_pidfd_getfd (__NR_Linux + 438)
+#define __NR_faccessat2 (__NR_Linux + 439)
+#define __NR_process_madvise (__NR_Linux + 440)
+#define __NR_epoll_pwait2 (__NR_Linux + 441)
+#define __NR_mount_setattr (__NR_Linux + 442)
+#define __NR_quotactl_fd (__NR_Linux + 443)
+#define __NR_landlock_create_ruleset (__NR_Linux + 444)
+#define __NR_landlock_add_rule (__NR_Linux + 445)
+#define __NR_landlock_restrict_self (__NR_Linux + 446)
+#define __NR_process_mrelease (__NR_Linux + 448)
+#define __NR_futex_waitv (__NR_Linux + 449)
+#define __NR_set_mempolicy_home_node (__NR_Linux + 450)
+#define __NR_cachestat (__NR_Linux + 451)
+#define __NR_fchmodat2 (__NR_Linux + 452)
+#define __NR_map_shadow_stack (__NR_Linux + 453)
+#define __NR_futex_wake (__NR_Linux + 454)
+#define __NR_futex_wait (__NR_Linux + 455)
+#define __NR_futex_requeue (__NR_Linux + 456)
+#define __NR_statmount (__NR_Linux + 457)
+#define __NR_listmount (__NR_Linux + 458)
+#define __NR_lsm_get_self_attr (__NR_Linux + 459)
+#define __NR_lsm_set_self_attr (__NR_Linux + 460)
+#define __NR_lsm_list_modules (__NR_Linux + 461)
#else
#error unknown mips64 abi
--
2.45.2

View File

@ -0,0 +1,46 @@
From b48fcb0bff14044caece520611233feb157401bf Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Mon, 24 Jun 2024 14:56:37 +0200
Subject: [PATCH 17/21] gdbserver_tests filters remove python rpm module load
warning
gdb on Fedora will warn not being able to load the rpm python module.
Unable to load 'rpm' module. Please install the python3-rpm package.
Filter out that message so tests don't fail.
(cherry picked from commit d6c7d47eb4c13a3d83c091d453f527a1b74cf4ef)
---
gdbserver_tests/filter_gdb.in | 3 +++
gdbserver_tests/filter_vgdb.in | 3 +++
2 files changed, 6 insertions(+)
diff --git a/gdbserver_tests/filter_gdb.in b/gdbserver_tests/filter_gdb.in
index 497171732b25..f0400fd18be6 100755
--- a/gdbserver_tests/filter_gdb.in
+++ b/gdbserver_tests/filter_gdb.in
@@ -51,6 +51,9 @@ s/^\[?1034hReading symbols/Reading symbols/
# Remove some Suse package manager messages
/^Try: zypper install -C/d
+# Remove python rpm module load warning
+/^Unable to load 'rpm' module. Please install the python3-rpm package./d
+
# Remove vgdb message
/relaying data between gdb and process/d
diff --git a/gdbserver_tests/filter_vgdb.in b/gdbserver_tests/filter_vgdb.in
index 139aea2bcc52..71f1f702537e 100755
--- a/gdbserver_tests/filter_vgdb.in
+++ b/gdbserver_tests/filter_vgdb.in
@@ -47,5 +47,8 @@ $SED -e '/Use.*info auto-load python-scripts.*/d' |
$SED -e '/warning: Invalid entry in .debug_gdb_scripts section/d' |
$SED -e "/Use .info auto-load python .REGEXP.. to list them./d" |
+# Remove python rpm module load warning
+$SED -e "/^Unable to load 'rpm' module. Please install the python3-rpm package./d" |
+
# and filter out any remaining empty lines
$SED -e '/^$/d'
--
2.45.2

View File

@ -0,0 +1,318 @@
From 0ddeadb018a19f4033dbf63aa336561c07074688 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sun, 30 Jun 2024 20:17:32 +0200
Subject: [PATCH 18/21] Implement VMOVQ xmm1, xmm2/m64
We implemented the memory variant already, but not the reg variant.
Add a separate avx-vmovq testcase, because avx-1 is already really big.
https://bugs.kde.org/show_bug.cgi?id=391148
https://bugs.kde.org/show_bug.cgi?id=417572
https://bugs.kde.org/show_bug.cgi?id=489088
(cherry picked from commit 10a22445d747817932692b1c1ee3faa726121cb4)
---
.gitignore | 1 +
NEWS | 3 +
VEX/priv/guest_amd64_toIR.c | 10 +-
none/tests/amd64/Makefile.am | 6 +-
none/tests/amd64/avx-vmovq.c | 19 +++
none/tests/amd64/avx-vmovq.stderr.exp | 0
none/tests/amd64/avx-vmovq.stdout.exp | 162 ++++++++++++++++++++++++++
none/tests/amd64/avx-vmovq.vgtest | 3 +
8 files changed, 200 insertions(+), 4 deletions(-)
create mode 100644 none/tests/amd64/avx-vmovq.c
create mode 100644 none/tests/amd64/avx-vmovq.stderr.exp
create mode 100644 none/tests/amd64/avx-vmovq.stdout.exp
create mode 100644 none/tests/amd64/avx-vmovq.vgtest
diff --git a/NEWS b/NEWS
index 9f4f69744086..cd89e50829bd 100644
--- a/NEWS
+++ b/NEWS
@@ -8,7 +8,9 @@ The following bugs have been fixed or resolved on this branch.
202770 open fd at exit --log-socket=127.0.0.1:1500 with --track-fds=yes
311655 --log-file=FILE leads to apparent fd leak
337388 fcntl works on Valgrind's own file descriptors
+391148 Unhandled AVX instruction vmovq %xmm9,%xmm1
444781 MIPS: wrong syscall numbers used
+417572 vex amd64->IR: unhandled instruction bytes: 0xC5 0x79 0xD6 0xED 0xC5
453044 gbserver_tests failures in aarch64
479661 Valgrind leaks file descriptors
486180 [MIPS] 'VexGuestArchState' has no member named 'guest_IP_AT_SYSCALL'
@@ -16,6 +18,7 @@ The following bugs have been fixed or resolved on this branch.
486569 linux inotify_init syscall wrapper missing POST entry in syscall_table
487439 SIGILL in JDK11, JDK17
488379 --track-fds=yes errors that cannot be suppressed with --xml-file=
+489088 Valgrind throws unhandled instruction bytes: 0xC5 0x79 0xD6 0xE0 0xC5
n-i-bz aarch64 frinta and frinta vector instructions
To see details of a given bug, visit
diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c
index 28c37f092211..57a8a434b845 100644
--- a/VEX/priv/guest_amd64_toIR.c
+++ b/VEX/priv/guest_amd64_toIR.c
@@ -27015,7 +27015,6 @@ Long dis_ESC_0F__VEX (
break;
case 0xD6:
- /* I can't even find any Intel docs for this one. */
/* Basically: 66 0F D6 = MOVQ -- move 64 bits from G (lo half
xmm) to E (mem or lo half xmm). Looks like L==0(128), W==0
(WIG, maybe?) */
@@ -27024,8 +27023,15 @@ Long dis_ESC_0F__VEX (
UChar modrm = getUChar(delta);
UInt rG = gregOfRexRM(pfx,modrm);
if (epartIsReg(modrm)) {
- /* fall through, awaiting test case */
/* dst: lo half copied, hi half zeroed */
+ UInt rE = eregOfRexRM(pfx,modrm);
+ putXMMRegLane64( rE, 0, getXMMRegLane64( rG, 0 ));
+ /* zero bits 255:64 */
+ putXMMRegLane64( rE, 1, mkU64(0) );
+ putYMMRegLane128( rE, 1, mkV128(0) );
+ DIP("vmovq %s,%s\n", nameXMMReg(rG), nameXMMReg(rE));
+ delta += 1;
+ goto decode_success;
} else {
addr = disAMode ( &alen, vbi, pfx, delta, dis_buf, 0 );
storeLE( mkexpr(addr), getXMMRegLane64( rG, 0 ));
diff --git a/none/tests/amd64/Makefile.am b/none/tests/amd64/Makefile.am
index 83029c15590c..e4d907c3dd54 100644
--- a/none/tests/amd64/Makefile.am
+++ b/none/tests/amd64/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.tool-tests.am
dist_noinst_SCRIPTS = filter_cpuid filter_inf_nan filter_stderr gen_insn_test.pl
-# Used by avx-1.c and avx_estimate_insn.c
+# Used by avx-1.c, avx-vmovq and avx_estimate_insn.c
noinst_HEADERS = avx_tests.h
CLEANFILES = $(addsuffix .c,$(INSN_TESTS))
@@ -29,6 +29,7 @@ EXTRA_DIST = \
avx-1.vgtest avx-1.stdout.exp avx-1.stderr.exp \
avx_estimate_insn.vgtest avx_estimate_insn.stderr.exp \
avx_estimate_insn.stdout.exp avx_estimate_insn.stdout.exp-amd \
+ avx-vmovq.vgtest avx-vmovq.stdout.exp avx-vmovq.stderr.exp \
avx2-1.vgtest avx2-1.stdout.exp avx2-1.stderr.exp \
asorep.stderr.exp asorep.stdout.exp asorep.vgtest \
bmi.stderr.exp bmi.stdout.exp bmi.vgtest \
@@ -131,7 +132,8 @@ endif
if BUILD_AVX_TESTS
if BUILD_VPCLMULQDQ_TESTS
check_PROGRAMS += avx-1 \
- avx_estimate_insn
+ avx_estimate_insn \
+ avx-vmovq
endif
if BUILD_FMA4_TESTS
check_PROGRAMS += fma4
diff --git a/none/tests/amd64/avx-vmovq.c b/none/tests/amd64/avx-vmovq.c
new file mode 100644
index 000000000000..da8a1959b34f
--- /dev/null
+++ b/none/tests/amd64/avx-vmovq.c
@@ -0,0 +1,19 @@
+#include"avx_tests.h"
+
+GEN_test_RandM(VMOVQ_XMM_to_XMM_LOW_HIGH,
+ "vmovq %%xmm9, %%xmm7",
+ "vmovq %%xmm8, (%%rsi)")
+
+// xmm0 is scratch
+GEN_test_RandM(VMOVQ_XMM_to_XMM_LOW_LOW_HIGH,
+ "vmovq %%xmm0, %%xmm7; vmovq %%xmm8, %%xmm0",
+ "vmovq %%xmm0, (%%rsi); vmovq %%xmm9, %%xmm0")
+
+int main ( void )
+{
+ DO_D( VMOVQ_XMM_to_XMM_LOW_HIGH );
+ DO_D( VMOVQ_XMM_to_XMM_LOW_LOW_HIGH );
+
+ return 0;
+}
+
diff --git a/none/tests/amd64/avx-vmovq.stderr.exp b/none/tests/amd64/avx-vmovq.stderr.exp
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/none/tests/amd64/avx-vmovq.stdout.exp b/none/tests/amd64/avx-vmovq.stdout.exp
new file mode 100644
index 000000000000..f5b45e54de79
--- /dev/null
+++ b/none/tests/amd64/avx-vmovq.stdout.exp
@@ -0,0 +1,162 @@
+VMOVQ_XMM_to_XMM_LOW_HIGH(reg)
+ before
+ 7d6528c5fa956a0d.69c3e9a6af27d13b.5175e39d19c9ca1e.98f24a4984175700
+ b6d2fb5aa7bc5127.fe9915e556a044b2.60b160857d45c484.47b8d8c0eeef1e50
+ 065d77195d623e6b.842adc6450659e17.19a348215c3a67fd.399182c2dbcc2d38
+ cb509970b8136c85.d740b80eb7839b97.d89998df5035ed36.4a4bc43968bc40e5
+ 56b01a12b0ca1583
+ after
+ 0000000000000000.0000000000000000.0000000000000000.4a4bc43968bc40e5
+ b6d2fb5aa7bc5127.fe9915e556a044b2.60b160857d45c484.47b8d8c0eeef1e50
+ 065d77195d623e6b.842adc6450659e17.19a348215c3a67fd.399182c2dbcc2d38
+ cb509970b8136c85.d740b80eb7839b97.d89998df5035ed36.4a4bc43968bc40e5
+ 56b01a12b0ca1583
+VMOVQ_XMM_to_XMM_LOW_HIGH(mem)
+ before
+ 398e0039cf03663d.5ff85bc9535c191f.d3a727d1a705f65d.f9dd4a29f8c093db
+ cfaff39be272ef40.20a1bb92cbc97fe8.542da4983df76c96.d8bc5c6dee699597
+ f4e06e2205236eb7.6897b536bbe4da8a.369dab4f9465b86e.d182c916cebc2e17
+ 84ededbc53239dcf.95264321bf3b68b2.55c2b9e2c95c9810.407b8d9035449b06
+ 81f2a547be8d1811
+ after
+ 398e0039cf03663d.5ff85bc9535c191f.d3a727d1a705f65d.d8bc5c6dee699597
+ cfaff39be272ef40.20a1bb92cbc97fe8.542da4983df76c96.d8bc5c6dee699597
+ f4e06e2205236eb7.6897b536bbe4da8a.369dab4f9465b86e.d182c916cebc2e17
+ 84ededbc53239dcf.95264321bf3b68b2.55c2b9e2c95c9810.407b8d9035449b06
+ 81f2a547be8d1811
+
+VMOVQ_XMM_to_XMM_LOW_HIGH(reg)
+ before
+ f0350ca70523e0e4.5ba1ec54e87d39b3.019963bf7459630b.8d69483df7e8c6a9
+ e98ebd1ca893312a.54cae7d5e13dfe91.0a3e0f7c75cb0842.b95ed64d3b13ff64
+ c84ab71340684590.4d325b2d5a70a792.0a5f45c55f1c9202.b76ddefcb0ebfe6e
+ e9b5f3f66b2e58c1.21a6c3476d21f1e5.5f490104ced83ff8.6262dd37727c80f3
+ 96084deb9ed0411e
+ after
+ 0000000000000000.0000000000000000.0000000000000000.6262dd37727c80f3
+ e98ebd1ca893312a.54cae7d5e13dfe91.0a3e0f7c75cb0842.b95ed64d3b13ff64
+ c84ab71340684590.4d325b2d5a70a792.0a5f45c55f1c9202.b76ddefcb0ebfe6e
+ e9b5f3f66b2e58c1.21a6c3476d21f1e5.5f490104ced83ff8.6262dd37727c80f3
+ 96084deb9ed0411e
+VMOVQ_XMM_to_XMM_LOW_HIGH(mem)
+ before
+ 2e2dac0350f6fd1c.a81b6e33c572a86a.acf29b0f395c98b4.63483da65c8c49d0
+ 089b756aa3f77018.61c82534e9bf6f37.c9e25f72d82e582b.73a8f718a8c3ec35
+ ff1f240eb3e1553f.6f07136773a2ead3.56428c5a66a2ec77.ecb42ac54b0966d4
+ ee8536da9dbf68bc.3026343700a654eb.2ddd9db4ffc411c4.28bad218e4ebf159
+ 8404eb7f0cf4ca6f
+ after
+ 2e2dac0350f6fd1c.a81b6e33c572a86a.acf29b0f395c98b4.73a8f718a8c3ec35
+ 089b756aa3f77018.61c82534e9bf6f37.c9e25f72d82e582b.73a8f718a8c3ec35
+ ff1f240eb3e1553f.6f07136773a2ead3.56428c5a66a2ec77.ecb42ac54b0966d4
+ ee8536da9dbf68bc.3026343700a654eb.2ddd9db4ffc411c4.28bad218e4ebf159
+ 8404eb7f0cf4ca6f
+
+VMOVQ_XMM_to_XMM_LOW_HIGH(reg)
+ before
+ 5cdf726562b02dc2.b39925ba7d9d67bc.ff6f850f2c57ea2a.2c810e6dc1a1833d
+ 0c9761367fac55ff.28276f9a6e880c6b.372f015d9242e83d.2ef85b6fc544fd0f
+ f078b65e01737fd2.2bfa8f668c8b14f4.36b2a38dcef18acf.0e0f01a829ba3c66
+ 65ce6d498492e7e7.96df010bf4b23b84.57436a097df30b8d.aa927a03090dfc6d
+ dc4c446c804bf950
+ after
+ 0000000000000000.0000000000000000.0000000000000000.aa927a03090dfc6d
+ 0c9761367fac55ff.28276f9a6e880c6b.372f015d9242e83d.2ef85b6fc544fd0f
+ f078b65e01737fd2.2bfa8f668c8b14f4.36b2a38dcef18acf.0e0f01a829ba3c66
+ 65ce6d498492e7e7.96df010bf4b23b84.57436a097df30b8d.aa927a03090dfc6d
+ dc4c446c804bf950
+VMOVQ_XMM_to_XMM_LOW_HIGH(mem)
+ before
+ 810bdacfab80ee3d.c5e48064a393c8e9.47a34273c10a3c47.f5304f3e3ad1a923
+ 769ab818a5b7985e.6d08ed19fa045f84.1810cd8c109ed568.6ec34f98a2199d3c
+ 95c45b338afcb3df.b984aed62671e865.e6f21d40fc7bc013.1c4a678450562685
+ bc563e0c775bfaed.05a5c205c3659f38.8e17b17da2acb976.5d0f926ce1157eaa
+ 8b5fccbef0e1e256
+ after
+ 810bdacfab80ee3d.c5e48064a393c8e9.47a34273c10a3c47.6ec34f98a2199d3c
+ 769ab818a5b7985e.6d08ed19fa045f84.1810cd8c109ed568.6ec34f98a2199d3c
+ 95c45b338afcb3df.b984aed62671e865.e6f21d40fc7bc013.1c4a678450562685
+ bc563e0c775bfaed.05a5c205c3659f38.8e17b17da2acb976.5d0f926ce1157eaa
+ 8b5fccbef0e1e256
+
+VMOVQ_XMM_to_XMM_LOW_LOW_HIGH(reg)
+ before
+ 048612e51a468e36.c51cdd8f87e12ab4.acb722146c6cbfa9.ea4a022e1d3d7dbb
+ 22cf5e4cfad1bdf5.8de2b4a9d799ff5f.0c05cb6ebd128663.d7568e3e8a3ac80e
+ 4288ae612c0dad40.f0733f448390351b.80ddba7e53e42d12.3208cf9b04b0569c
+ c1fbfd8f4d8698c2.cb9dfb4ea5d18713.6489eab2c96df363.d52c4330a7aae391
+ 9d8e66ea90352a18
+ after
+ 0000000000000000.0000000000000000.0000000000000000.2525252525252525
+ 22cf5e4cfad1bdf5.8de2b4a9d799ff5f.0c05cb6ebd128663.d7568e3e8a3ac80e
+ 4288ae612c0dad40.f0733f448390351b.80ddba7e53e42d12.3208cf9b04b0569c
+ c1fbfd8f4d8698c2.cb9dfb4ea5d18713.6489eab2c96df363.d52c4330a7aae391
+ 9d8e66ea90352a18
+VMOVQ_XMM_to_XMM_LOW_LOW_HIGH(mem)
+ before
+ 66fab2b3db5ce85e.f9754842f9c9ba28.f82a63b15c68b274.14575775bc3a1202
+ 0c3ca578a32bd88e.474289e7cb61501e.54e7f35bc162726a.ec91fe34c7d6c79a
+ 6b1fba2604afb8d5.08aebee85fda964f.bba02737f3c98220.4784d95987cd4ed8
+ 5f706da71bf2425f.9605e2b252c1c868.09217c310baca0c3.837be65197abe268
+ fbc4208894fdc0f5
+ after
+ 66fab2b3db5ce85e.f9754842f9c9ba28.f82a63b15c68b274.2525252525252525
+ 0c3ca578a32bd88e.474289e7cb61501e.54e7f35bc162726a.ec91fe34c7d6c79a
+ 6b1fba2604afb8d5.08aebee85fda964f.bba02737f3c98220.4784d95987cd4ed8
+ 5f706da71bf2425f.9605e2b252c1c868.09217c310baca0c3.837be65197abe268
+ fbc4208894fdc0f5
+
+VMOVQ_XMM_to_XMM_LOW_LOW_HIGH(reg)
+ before
+ 0aaa836b194e242c.c5fc3ae904033357.4e92f1b240a12214.1a366d352714867e
+ 0e780c65c22b4ab8.778d9ed6d9eb46ea.8ca3e752c306df00.caab752f630ff07e
+ 627bb6e12d1f6d46.51ef145cb9b83843.ac82c1007a7d3cd8.f54b130cdaa89cef
+ 61ff7d4df3b6ca81.31f01866bd76c58f.0a7c7a27fe917447.77e3c0b6a9ec44fc
+ 2c3ffa1aebe6a4d2
+ after
+ 0000000000000000.0000000000000000.0000000000000000.2525252525252525
+ 0e780c65c22b4ab8.778d9ed6d9eb46ea.8ca3e752c306df00.caab752f630ff07e
+ 627bb6e12d1f6d46.51ef145cb9b83843.ac82c1007a7d3cd8.f54b130cdaa89cef
+ 61ff7d4df3b6ca81.31f01866bd76c58f.0a7c7a27fe917447.77e3c0b6a9ec44fc
+ 2c3ffa1aebe6a4d2
+VMOVQ_XMM_to_XMM_LOW_LOW_HIGH(mem)
+ before
+ f02b3b25bca27a9c.69505d14b27d9d16.f25b26e0042fa9fa.02dd0e32eecfc5fa
+ 9f7301c1392d8087.d4ba52a206ff21b1.70fbbab6a7f19faf.f0f1798fe3c1699c
+ 15e3c8dc7e9273bf.0088596389c893fd.879d51d4c5c764db.3004b7a97cf69dda
+ 2d460a61a5dd0f6f.47086cc3da642fa7.130d662777beb4a9.1e61c5ec52f79c60
+ 16559ec50352a3d9
+ after
+ f02b3b25bca27a9c.69505d14b27d9d16.f25b26e0042fa9fa.2525252525252525
+ 9f7301c1392d8087.d4ba52a206ff21b1.70fbbab6a7f19faf.f0f1798fe3c1699c
+ 15e3c8dc7e9273bf.0088596389c893fd.879d51d4c5c764db.3004b7a97cf69dda
+ 2d460a61a5dd0f6f.47086cc3da642fa7.130d662777beb4a9.1e61c5ec52f79c60
+ 16559ec50352a3d9
+
+VMOVQ_XMM_to_XMM_LOW_LOW_HIGH(reg)
+ before
+ 742c3e9e2b92eef2.c569453ccd1b0fc4.0784892e9360315b.f0177599dbe14b46
+ 9432a2e46543b956.b819f459105730e9.9a49ac115048d4c4.f987fa170d3ce4dd
+ d2b3c4044ef23fb2.e22093a48a9d2e0b.5da3cfd6aea6558e.0c28728e28dc3c9c
+ 89fba268812abdb2.1e4a9e0958fac555.adddf0eb4808f067.04c857e949cc0fac
+ bc3127138b19183c
+ after
+ 0000000000000000.0000000000000000.0000000000000000.2525252525252525
+ 9432a2e46543b956.b819f459105730e9.9a49ac115048d4c4.f987fa170d3ce4dd
+ d2b3c4044ef23fb2.e22093a48a9d2e0b.5da3cfd6aea6558e.0c28728e28dc3c9c
+ 89fba268812abdb2.1e4a9e0958fac555.adddf0eb4808f067.04c857e949cc0fac
+ bc3127138b19183c
+VMOVQ_XMM_to_XMM_LOW_LOW_HIGH(mem)
+ before
+ 12305efa0acd1475.1755377e9a786f01.4a6592749579b0f4.e4450ababbfae0f9
+ e1917689e3f6bf86.d70f7fb13667914c.413cead25e27ac14.5f2619b1a20662f0
+ 0420edac31a0d599.2573776df1835e3e.de9a220dce0e75e0.7acb193b9abab2f9
+ 59a93d4f11d611db.5cce191e65591384.ff4cb613013cc685.918107c43ea20cc0
+ 0194ddb82b49abf0
+ after
+ 12305efa0acd1475.1755377e9a786f01.4a6592749579b0f4.2525252525252525
+ e1917689e3f6bf86.d70f7fb13667914c.413cead25e27ac14.5f2619b1a20662f0
+ 0420edac31a0d599.2573776df1835e3e.de9a220dce0e75e0.7acb193b9abab2f9
+ 59a93d4f11d611db.5cce191e65591384.ff4cb613013cc685.918107c43ea20cc0
+ 0194ddb82b49abf0
+
diff --git a/none/tests/amd64/avx-vmovq.vgtest b/none/tests/amd64/avx-vmovq.vgtest
new file mode 100644
index 000000000000..ba4f5caaf2ad
--- /dev/null
+++ b/none/tests/amd64/avx-vmovq.vgtest
@@ -0,0 +1,3 @@
+prog: avx-vmovq
+prereq: test -x avx-vmovq && ../../../tests/x86_amd64_features amd64-avx
+vgopts: -q
--
2.45.2

View File

@ -0,0 +1,258 @@
From 323a62b56b828d59eece2336af9ee6abf473d712 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= <bernhardu@mailbox.org>
Date: Thu, 27 Jun 2024 22:51:09 +0200
Subject: [PATCH 19/21] arm64: Fix fcvtas instruction.
(cherry picked from commit de4c79ffbcd2d5e89495cee8feadf77d5f3a6ef2)
---
NEWS | 1 +
VEX/priv/guest_arm64_toIR.c | 74 ++++++++++++++++++++-----------------
VEX/priv/host_arm64_defs.c | 23 +++++++-----
VEX/priv/host_arm64_defs.h | 3 +-
VEX/priv/host_arm64_isel.c | 12 +++---
5 files changed, 65 insertions(+), 48 deletions(-)
diff --git a/NEWS b/NEWS
index cd89e50829bd..d1419b9d3c12 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ The following bugs have been fixed or resolved on this branch.
487439 SIGILL in JDK11, JDK17
488379 --track-fds=yes errors that cannot be suppressed with --xml-file=
489088 Valgrind throws unhandled instruction bytes: 0xC5 0x79 0xD6 0xE0 0xC5
+489338 arm64: Instruction fcvtas should round 322.5 to 323, but result is 322.
n-i-bz aarch64 frinta and frinta vector instructions
To see details of a given bug, visit
diff --git a/VEX/priv/guest_arm64_toIR.c b/VEX/priv/guest_arm64_toIR.c
index 27d945d6328d..750383e1eb0f 100644
--- a/VEX/priv/guest_arm64_toIR.c
+++ b/VEX/priv/guest_arm64_toIR.c
@@ -15533,7 +15533,7 @@ Bool dis_AdvSIMD_fp_to_from_int_conv(/*MB_OUT*/DisResult* dres, UInt insn)
} else {
vassert(op == BITS3(1,0,0) || op == BITS3(1,0,1));
switch (rm) {
- case BITS2(0,0): ch = 'a'; irrm = Irrm_NEAREST; break;
+ case BITS2(0,0): ch = 'a'; irrm = Irrm_NEAREST_TIE_AWAY_0; break;
default: vassert(0);
}
}
@@ -15557,45 +15557,53 @@ Bool dis_AdvSIMD_fp_to_from_int_conv(/*MB_OUT*/DisResult* dres, UInt insn)
IROp iop = iops[ix];
// A bit of ATCery: bounce all cases we haven't seen an example of.
if (/* F32toI32S */
- (iop == Iop_F32toI32S && irrm == Irrm_ZERO) /* FCVTZS Wd,Sn */
- || (iop == Iop_F32toI32S && irrm == Irrm_NegINF) /* FCVTMS Wd,Sn */
- || (iop == Iop_F32toI32S && irrm == Irrm_PosINF) /* FCVTPS Wd,Sn */
- || (iop == Iop_F32toI32S && irrm == Irrm_NEAREST)/* FCVT{A,N}S W,S */
+ (iop == Iop_F32toI32S && irrm == Irrm_ZERO) /* FCVTZS Wd,Sn */
+ || (iop == Iop_F32toI32S && irrm == Irrm_NegINF) /* FCVTMS Wd,Sn */
+ || (iop == Iop_F32toI32S && irrm == Irrm_PosINF) /* FCVTPS Wd,Sn */
+ || (iop == Iop_F32toI32S && irrm == Irrm_NEAREST) /* FCVTNS W,S */
+ || (iop == Iop_F32toI32S && irrm == Irrm_NEAREST_TIE_AWAY_0)/* FCVTAS W,S */
/* F32toI32U */
- || (iop == Iop_F32toI32U && irrm == Irrm_ZERO) /* FCVTZU Wd,Sn */
- || (iop == Iop_F32toI32U && irrm == Irrm_NegINF) /* FCVTMU Wd,Sn */
- || (iop == Iop_F32toI32U && irrm == Irrm_PosINF) /* FCVTPU Wd,Sn */
- || (iop == Iop_F32toI32U && irrm == Irrm_NEAREST)/* FCVT{A,N}U W,S */
+ || (iop == Iop_F32toI32U && irrm == Irrm_ZERO) /* FCVTZU Wd,Sn */
+ || (iop == Iop_F32toI32U && irrm == Irrm_NegINF) /* FCVTMU Wd,Sn */
+ || (iop == Iop_F32toI32U && irrm == Irrm_PosINF) /* FCVTPU Wd,Sn */
+ || (iop == Iop_F32toI32U && irrm == Irrm_NEAREST) /* FCVTNU W,S */
+ || (iop == Iop_F32toI32U && irrm == Irrm_NEAREST_TIE_AWAY_0)/* FCVTAU W,S */
/* F32toI64S */
- || (iop == Iop_F32toI64S && irrm == Irrm_ZERO) /* FCVTZS Xd,Sn */
- || (iop == Iop_F32toI64S && irrm == Irrm_NegINF) /* FCVTMS Xd,Sn */
- || (iop == Iop_F32toI64S && irrm == Irrm_PosINF) /* FCVTPS Xd,Sn */
- || (iop == Iop_F32toI64S && irrm == Irrm_NEAREST)/* FCVT{A,N}S X,S */
+ || (iop == Iop_F32toI64S && irrm == Irrm_ZERO) /* FCVTZS Xd,Sn */
+ || (iop == Iop_F32toI64S && irrm == Irrm_NegINF) /* FCVTMS Xd,Sn */
+ || (iop == Iop_F32toI64S && irrm == Irrm_PosINF) /* FCVTPS Xd,Sn */
+ || (iop == Iop_F32toI64S && irrm == Irrm_NEAREST) /* FCVTNS X,S */
+ || (iop == Iop_F32toI64S && irrm == Irrm_NEAREST_TIE_AWAY_0)/* FCVTAS X,S */
/* F32toI64U */
- || (iop == Iop_F32toI64U && irrm == Irrm_ZERO) /* FCVTZU Xd,Sn */
- || (iop == Iop_F32toI64U && irrm == Irrm_NegINF) /* FCVTMU Xd,Sn */
- || (iop == Iop_F32toI64U && irrm == Irrm_PosINF) /* FCVTPU Xd,Sn */
- || (iop == Iop_F32toI64U && irrm == Irrm_NEAREST)/* FCVT{A,N}U X,S */
+ || (iop == Iop_F32toI64U && irrm == Irrm_ZERO) /* FCVTZU Xd,Sn */
+ || (iop == Iop_F32toI64U && irrm == Irrm_NegINF) /* FCVTMU Xd,Sn */
+ || (iop == Iop_F32toI64U && irrm == Irrm_PosINF) /* FCVTPU Xd,Sn */
+ || (iop == Iop_F32toI64U && irrm == Irrm_NEAREST) /* FCVTNU X,S */
+ || (iop == Iop_F32toI64U && irrm == Irrm_NEAREST_TIE_AWAY_0)/* FCVTAU X,S */
/* F64toI32S */
- || (iop == Iop_F64toI32S && irrm == Irrm_ZERO) /* FCVTZS Wd,Dn */
- || (iop == Iop_F64toI32S && irrm == Irrm_NegINF) /* FCVTMS Wd,Dn */
- || (iop == Iop_F64toI32S && irrm == Irrm_PosINF) /* FCVTPS Wd,Dn */
- || (iop == Iop_F64toI32S && irrm == Irrm_NEAREST)/* FCVT{A,N}S W,D */
+ || (iop == Iop_F64toI32S && irrm == Irrm_ZERO) /* FCVTZS Wd,Dn */
+ || (iop == Iop_F64toI32S && irrm == Irrm_NegINF) /* FCVTMS Wd,Dn */
+ || (iop == Iop_F64toI32S && irrm == Irrm_PosINF) /* FCVTPS Wd,Dn */
+ || (iop == Iop_F64toI32S && irrm == Irrm_NEAREST) /* FCVTNS W,D */
+ || (iop == Iop_F64toI32S && irrm == Irrm_NEAREST_TIE_AWAY_0)/* FCVTAS W,D */
/* F64toI32U */
- || (iop == Iop_F64toI32U && irrm == Irrm_ZERO) /* FCVTZU Wd,Dn */
- || (iop == Iop_F64toI32U && irrm == Irrm_NegINF) /* FCVTMU Wd,Dn */
- || (iop == Iop_F64toI32U && irrm == Irrm_PosINF) /* FCVTPU Wd,Dn */
- || (iop == Iop_F64toI32U && irrm == Irrm_NEAREST)/* FCVT{A,N}U W,D */
+ || (iop == Iop_F64toI32U && irrm == Irrm_ZERO) /* FCVTZU Wd,Dn */
+ || (iop == Iop_F64toI32U && irrm == Irrm_NegINF) /* FCVTMU Wd,Dn */
+ || (iop == Iop_F64toI32U && irrm == Irrm_PosINF) /* FCVTPU Wd,Dn */
+ || (iop == Iop_F64toI32U && irrm == Irrm_NEAREST) /* FCVTNU W,D */
+ || (iop == Iop_F64toI32U && irrm == Irrm_NEAREST_TIE_AWAY_0)/* FCVTAU W,D */
/* F64toI64S */
- || (iop == Iop_F64toI64S && irrm == Irrm_ZERO) /* FCVTZS Xd,Dn */
- || (iop == Iop_F64toI64S && irrm == Irrm_NegINF) /* FCVTMS Xd,Dn */
- || (iop == Iop_F64toI64S && irrm == Irrm_PosINF) /* FCVTPS Xd,Dn */
- || (iop == Iop_F64toI64S && irrm == Irrm_NEAREST)/* FCVT{A,N}S X,D */
+ || (iop == Iop_F64toI64S && irrm == Irrm_ZERO) /* FCVTZS Xd,Dn */
+ || (iop == Iop_F64toI64S && irrm == Irrm_NegINF) /* FCVTMS Xd,Dn */
+ || (iop == Iop_F64toI64S && irrm == Irrm_PosINF) /* FCVTPS Xd,Dn */
+ || (iop == Iop_F64toI64S && irrm == Irrm_NEAREST) /* FCVTNS X,D */
+ || (iop == Iop_F64toI64S && irrm == Irrm_NEAREST_TIE_AWAY_0)/* FCVTAS X,D */
/* F64toI64U */
- || (iop == Iop_F64toI64U && irrm == Irrm_ZERO) /* FCVTZU Xd,Dn */
- || (iop == Iop_F64toI64U && irrm == Irrm_NegINF) /* FCVTMU Xd,Dn */
- || (iop == Iop_F64toI64U && irrm == Irrm_PosINF) /* FCVTPU Xd,Dn */
- || (iop == Iop_F64toI64U && irrm == Irrm_NEAREST)/* FCVT{A,N}U X,D */
+ || (iop == Iop_F64toI64U && irrm == Irrm_ZERO) /* FCVTZU Xd,Dn */
+ || (iop == Iop_F64toI64U && irrm == Irrm_NegINF) /* FCVTMU Xd,Dn */
+ || (iop == Iop_F64toI64U && irrm == Irrm_PosINF) /* FCVTPU Xd,Dn */
+ || (iop == Iop_F64toI64U && irrm == Irrm_NEAREST) /* FCVTNU X,D */
+ || (iop == Iop_F64toI64U && irrm == Irrm_NEAREST_TIE_AWAY_0)/* FCVTAU X,D */
) {
/* validated */
} else {
diff --git a/VEX/priv/host_arm64_defs.c b/VEX/priv/host_arm64_defs.c
index 0b59c87cd3bd..dc5d198e0dc3 100644
--- a/VEX/priv/host_arm64_defs.c
+++ b/VEX/priv/host_arm64_defs.c
@@ -1142,13 +1142,14 @@ ARM64Instr* ARM64Instr_VCvtI2F ( ARM64CvtOp how, HReg rD, HReg rS ) {
return i;
}
ARM64Instr* ARM64Instr_VCvtF2I ( ARM64CvtOp how, HReg rD, HReg rS,
- UChar armRM ) {
+ UChar armRM, Bool tiesToAway ) {
ARM64Instr* i = LibVEX_Alloc_inline(sizeof(ARM64Instr));
i->tag = ARM64in_VCvtF2I;
i->ARM64in.VCvtF2I.how = how;
i->ARM64in.VCvtF2I.rD = rD;
i->ARM64in.VCvtF2I.rS = rS;
i->ARM64in.VCvtF2I.armRM = armRM;
+ i->ARM64in.VCvtF2I.tiesToAway = tiesToAway;
vassert(armRM <= 3);
return i;
}
@@ -4463,47 +4464,51 @@ Int emit_ARM64Instr ( /*MB_MOD*/Bool* is_profInc,
---------------- 01 -------------- FCVTP-------- (round to +inf)
---------------- 10 -------------- FCVTM-------- (round to -inf)
---------------- 11 -------------- FCVTZ-------- (round to zero)
+ ---------------- 00 100 ---------- FCVTAS------- (nearest, ties away)
+ ---------------- 00 101 ---------- FCVTAU------- (nearest, ties away)
Rd is Xd when sf==1, Wd when sf==0
Fn is Dn when x==1, Sn when x==0
20:19 carry the rounding mode, using the same encoding as FPCR
+ 18 enable translation to FCVTA{S,U}
*/
UInt rD = iregEnc(i->ARM64in.VCvtF2I.rD);
UInt rN = dregEnc(i->ARM64in.VCvtF2I.rS);
ARM64CvtOp how = i->ARM64in.VCvtF2I.how;
UChar armRM = i->ARM64in.VCvtF2I.armRM;
+ UChar bit18 = i->ARM64in.VCvtF2I.tiesToAway ? 4 : 0;
/* Just handle cases as they show up. */
switch (how) {
case ARM64cvt_F64_I32S: /* FCVTxS Wd, Dn */
- *p++ = X_3_5_8_6_5_5(X000, X11110, X01100000 | (armRM << 3),
+ *p++ = X_3_5_8_6_5_5(X000, X11110, X01100000 | (armRM << 3) | bit18,
X000000, rN, rD);
break;
case ARM64cvt_F64_I32U: /* FCVTxU Wd, Dn */
- *p++ = X_3_5_8_6_5_5(X000, X11110, X01100001 | (armRM << 3),
+ *p++ = X_3_5_8_6_5_5(X000, X11110, X01100001 | (armRM << 3) | bit18,
X000000, rN, rD);
break;
case ARM64cvt_F64_I64S: /* FCVTxS Xd, Dn */
- *p++ = X_3_5_8_6_5_5(X100, X11110, X01100000 | (armRM << 3),
+ *p++ = X_3_5_8_6_5_5(X100, X11110, X01100000 | (armRM << 3) | bit18,
X000000, rN, rD);
break;
case ARM64cvt_F64_I64U: /* FCVTxU Xd, Dn */
- *p++ = X_3_5_8_6_5_5(X100, X11110, X01100001 | (armRM << 3),
+ *p++ = X_3_5_8_6_5_5(X100, X11110, X01100001 | (armRM << 3) | bit18,
X000000, rN, rD);
break;
case ARM64cvt_F32_I32S: /* FCVTxS Wd, Sn */
- *p++ = X_3_5_8_6_5_5(X000, X11110, X00100000 | (armRM << 3),
+ *p++ = X_3_5_8_6_5_5(X000, X11110, X00100000 | (armRM << 3) | bit18,
X000000, rN, rD);
break;
case ARM64cvt_F32_I32U: /* FCVTxU Wd, Sn */
- *p++ = X_3_5_8_6_5_5(X000, X11110, X00100001 | (armRM << 3),
+ *p++ = X_3_5_8_6_5_5(X000, X11110, X00100001 | (armRM << 3) | bit18,
X000000, rN, rD);
break;
case ARM64cvt_F32_I64S: /* FCVTxS Xd, Sn */
- *p++ = X_3_5_8_6_5_5(X100, X11110, X00100000 | (armRM << 3),
+ *p++ = X_3_5_8_6_5_5(X100, X11110, X00100000 | (armRM << 3) | bit18,
X000000, rN, rD);
break;
case ARM64cvt_F32_I64U: /* FCVTxU Xd, Sn */
- *p++ = X_3_5_8_6_5_5(X100, X11110, X00100001 | (armRM << 3),
+ *p++ = X_3_5_8_6_5_5(X100, X11110, X00100001 | (armRM << 3) | bit18,
X000000, rN, rD);
break;
default:
diff --git a/VEX/priv/host_arm64_defs.h b/VEX/priv/host_arm64_defs.h
index e78d8045ffaa..f24a2f4ba654 100644
--- a/VEX/priv/host_arm64_defs.h
+++ b/VEX/priv/host_arm64_defs.h
@@ -816,6 +816,7 @@ typedef
HReg rS; // src, a D or S register
UChar armRM; // ARM encoded RM:
// 00=nearest, 01=+inf, 10=-inf, 11=zero
+ Bool tiesToAway;
} VCvtF2I;
/* Convert between 32-bit and 64-bit FP values (both ways). (FCVT) */
struct {
@@ -1062,7 +1063,7 @@ extern ARM64Instr* ARM64Instr_VLdStD ( Bool isLoad, HReg dD, HReg rN,
extern ARM64Instr* ARM64Instr_VLdStQ ( Bool isLoad, HReg rQ, HReg rN );
extern ARM64Instr* ARM64Instr_VCvtI2F ( ARM64CvtOp how, HReg rD, HReg rS );
extern ARM64Instr* ARM64Instr_VCvtF2I ( ARM64CvtOp how, HReg rD, HReg rS,
- UChar armRM );
+ UChar armRM, Bool tiesToAway );
extern ARM64Instr* ARM64Instr_VCvtSD ( Bool sToD, HReg dst, HReg src );
extern ARM64Instr* ARM64Instr_VCvtHS ( Bool hToS, HReg dst, HReg src );
extern ARM64Instr* ARM64Instr_VCvtHD ( Bool hToD, HReg dst, HReg src );
diff --git a/VEX/priv/host_arm64_isel.c b/VEX/priv/host_arm64_isel.c
index 645358586f34..34c526559010 100644
--- a/VEX/priv/host_arm64_isel.c
+++ b/VEX/priv/host_arm64_isel.c
@@ -1921,17 +1921,19 @@ static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e )
UInt irrm = arg1con->Ico.U32;
/* Find the ARM-encoded equivalent for |irrm|. */
UInt armrm = 4; /* impossible */
+ Bool tiesToAway = False;
switch (irrm) {
- case Irrm_NEAREST: armrm = 0; break;
- case Irrm_NegINF: armrm = 2; break;
- case Irrm_PosINF: armrm = 1; break;
- case Irrm_ZERO: armrm = 3; break;
+ case Irrm_NEAREST: armrm = 0; break;
+ case Irrm_NegINF: armrm = 2; break;
+ case Irrm_PosINF: armrm = 1; break;
+ case Irrm_ZERO: armrm = 3; break;
+ case Irrm_NEAREST_TIE_AWAY_0: armrm = 0; tiesToAway = True; break;
default: goto irreducible;
}
HReg src = (srcIsD ? iselDblExpr : iselFltExpr)
(env, e->Iex.Binop.arg2);
HReg dst = newVRegI(env);
- addInstr(env, ARM64Instr_VCvtF2I(cvt_op, dst, src, armrm));
+ addInstr(env, ARM64Instr_VCvtF2I(cvt_op, dst, src, armrm, tiesToAway));
return dst;
}
} /* local scope */
--
2.45.2

View File

@ -0,0 +1,52 @@
From fdd27bab5f134fda0098f9c3a5c36199e3205fea Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Thu, 4 Jul 2024 18:04:18 +0200
Subject: [PATCH 20/21] gdbserver_tests filters remove more verbose python rpm
load warnings
The rpm python load warnings on Fedora became even more verbose.
Filter out all stderr messages related to them so tests don't fail.
(cherry picked from commit d73a8e745bf09cfc2d44e14f2ddd70fae2893d1d)
---
gdbserver_tests/filter_gdb.in | 5 ++++-
gdbserver_tests/filter_vgdb.in | 7 +++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/gdbserver_tests/filter_gdb.in b/gdbserver_tests/filter_gdb.in
index f0400fd18be6..38a3803eb1f8 100755
--- a/gdbserver_tests/filter_gdb.in
+++ b/gdbserver_tests/filter_gdb.in
@@ -52,7 +52,10 @@ s/^\[?1034hReading symbols/Reading symbols/
/^Try: zypper install -C/d
# Remove python rpm module load warning
-/^Unable to load 'rpm' module. Please install the python3-rpm package./d
+/^Unable to load /d
+/^the RPM suggestions /d
+/^installing missing debuginfo /d
+/^please install /d
# Remove vgdb message
/relaying data between gdb and process/d
diff --git a/gdbserver_tests/filter_vgdb.in b/gdbserver_tests/filter_vgdb.in
index 71f1f702537e..b32be689733b 100755
--- a/gdbserver_tests/filter_vgdb.in
+++ b/gdbserver_tests/filter_vgdb.in
@@ -47,8 +47,11 @@ $SED -e '/Use.*info auto-load python-scripts.*/d' |
$SED -e '/warning: Invalid entry in .debug_gdb_scripts section/d' |
$SED -e "/Use .info auto-load python .REGEXP.. to list them./d" |
-# Remove python rpm module load warning
-$SED -e "/^Unable to load 'rpm' module. Please install the python3-rpm package./d" |
+# Remove python rpm module load warnings
+$SED -e "/^Unable to load /d" |
+$SED -e "/^the RPM suggestions /d" |
+$SED -e "/^installing missing debuginfo /d" |
+$SED -e "/^please install /d" |
# and filter out any remaining empty lines
$SED -e '/^$/d'
--
2.45.2

View File

@ -0,0 +1,74 @@
From a62058256f2c1bbc00757dfe89d505d5c6eb9906 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Thu, 4 Jul 2024 15:21:39 +0200
Subject: [PATCH 21/21] Avoid dev/inode check on btrfs with --sanity-level=3
With --sanity-level=3 or higher the aspacemgr sanity checks the
device/inode numbers from /proc/self/maps to the file stat
results. These don't match on btrfs. So detect when a file is on a
btrfs volume and ignore the check in that case.
https://bugs.kde.org/show_bug.cgi?id=317127
(cherry picked from commit 3b06d458ffc5cc8de8d701926e5d86979185fa04)
---
NEWS | 1 +
coregrind/m_aspacemgr/aspacemgr-linux.c | 13 +++++++++++++
include/vki/vki-linux.h | 6 ++++++
3 files changed, 20 insertions(+)
diff --git a/NEWS b/NEWS
index d1419b9d3c12..c5fbc8699db8 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ The following bugs have been fixed or resolved on this branch.
202770 open fd at exit --log-socket=127.0.0.1:1500 with --track-fds=yes
311655 --log-file=FILE leads to apparent fd leak
+317127 Fedora18/x86_64 --sanity-level=3 : aspacem segment mismatch
337388 fcntl works on Valgrind's own file descriptors
391148 Unhandled AVX instruction vmovq %xmm9,%xmm1
444781 MIPS: wrong syscall numbers used
diff --git a/coregrind/m_aspacemgr/aspacemgr-linux.c b/coregrind/m_aspacemgr/aspacemgr-linux.c
index 83875e89b445..fb788e923eb4 100644
--- a/coregrind/m_aspacemgr/aspacemgr-linux.c
+++ b/coregrind/m_aspacemgr/aspacemgr-linux.c
@@ -883,6 +883,19 @@ static void sync_check_mapping_callback ( Addr addr, SizeT len, UInt prot,
/* hack apparently needed on MontaVista Linux */
if (filename && VG_(strstr)(filename, "/.lib-ro/"))
cmp_devino = False;
+
+ /* On linux systems we want to avoid dev/inode check on btrfs,
+ we can use the statfs call for that, except on nanomips
+ (which also doesn't have a sys_fstatfs syswrap).
+ See https://bugs.kde.org/show_bug.cgi?id=317127 */
+#if !defined(VGP_nanomips_linux)
+ struct vki_statfs statfs = {0};
+ SysRes res = VG_(do_syscall2)(__NR_statfs, (UWord)filename,
+ (UWord)&statfs);
+ if (!sr_isError(res) && statfs.f_type == VKI_BTRFS_SUPER_MAGIC) {
+ cmp_devino = False;
+ }
+#endif
#endif
/* If we are doing sloppy execute permission checks then we
diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h
index be3d76690cee..ccdb808af7a6 100644
--- a/include/vki/vki-linux.h
+++ b/include/vki/vki-linux.h
@@ -5455,6 +5455,12 @@ struct vki_open_how {
#define VKI_CLOSE_RANGE_UNSHARE (1U << 1)
#define VKI_CLOSE_RANGE_CLOEXEC (1U << 2)
+//----------------------------------------------------------------------
+// From linux/magic.h
+//----------------------------------------------------------------------
+
+#define VKI_BTRFS_SUPER_MAGIC 0x9123683E
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
--
2.45.2

View File

@ -1,122 +0,0 @@
commit 1d00e5ce0fb069911c4b525ec38289fb5d9021b0
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date: Sat Nov 18 08:49:34 2023 +0100
Bug 476548 - valgrind 3.22.0 fails on assertion when loading debuginfo file produced by mold
(cherry picked from commit 9ea4ae66707a4dcc6f4328e11911652e4418c585)
diff --git a/coregrind/m_debuginfo/image.c b/coregrind/m_debuginfo/image.c
index 02e509071..445f95555 100644
--- a/coregrind/m_debuginfo/image.c
+++ b/coregrind/m_debuginfo/image.c
@@ -1221,6 +1221,20 @@ Int ML_(img_strcmp_c)(DiImage* img, DiOffT off1, const HChar* str2)
}
}
+Int ML_(img_strcmp_n)(DiImage* img, DiOffT off1, const HChar* str2, Word n)
+{
+ ensure_valid(img, off1, 1, "ML_(img_strcmp_c)");
+ while (n) {
+ UChar c1 = get(img, off1);
+ UChar c2 = *(const UChar*)str2;
+ if (c1 < c2) return -1;
+ if (c1 > c2) return 1;
+ if (c1 == 0) return 0;
+ off1++; str2++; --n;
+ }
+ return 0;
+}
+
UChar ML_(img_get_UChar)(DiImage* img, DiOffT offset)
{
ensure_valid(img, offset, 1, "ML_(img_get_UChar)");
diff --git a/coregrind/m_debuginfo/priv_image.h b/coregrind/m_debuginfo/priv_image.h
index a49846f14..c91e49f01 100644
--- a/coregrind/m_debuginfo/priv_image.h
+++ b/coregrind/m_debuginfo/priv_image.h
@@ -115,6 +115,10 @@ Int ML_(img_strcmp)(DiImage* img, DiOffT off1, DiOffT off2);
cast to HChar before comparison. */
Int ML_(img_strcmp_c)(DiImage* img, DiOffT off1, const HChar* str2);
+/* Do strncmp of a C string in the image vs a normal one. Chars are
+ cast to HChar before comparison. */
+Int ML_(img_strcmp_n)(DiImage* img, DiOffT off1, const HChar* str2, Word n);
+
/* Do strlen of a C string in the image. */
SizeT ML_(img_strlen)(DiImage* img, DiOffT off);
diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c
index fb64ed976..46f8c8343 100644
--- a/coregrind/m_debuginfo/readelf.c
+++ b/coregrind/m_debuginfo/readelf.c
@@ -2501,8 +2501,7 @@ Bool ML_(read_elf_object) ( struct _DebugInfo* di )
di->rodata_avma += inrw1->bias;
di->rodata_bias = inrw1->bias;
di->rodata_debug_bias = inrw1->bias;
- }
- else {
+ } else {
BAD(".rodata"); /* should not happen? */
}
di->rodata_present = True;
@@ -2977,6 +2976,46 @@ Bool ML_(read_elf_object) ( struct _DebugInfo* di )
return retval;
}
+static void find_rodata(Word i, Word shnum, DiImage* dimg, struct _DebugInfo* di, DiOffT shdr_dioff,
+ UWord shdr_dent_szB, DiOffT shdr_strtab_dioff, PtrdiffT rw_dbias)
+{
+ ElfXX_Shdr a_shdr;
+ ElfXX_Shdr a_extra_shdr;
+ ML_(img_get)(&a_shdr, dimg,
+ INDEX_BIS(shdr_dioff, i, shdr_dent_szB),
+ sizeof(a_shdr));
+ if (di->rodata_present &&
+ 0 == ML_(img_strcmp_c)(dimg, shdr_strtab_dioff
+ + a_shdr.sh_name, ".rodata")) {
+ Word sh_size = a_shdr.sh_size;
+ Word j;
+ Word next_addr = a_shdr.sh_addr + a_shdr.sh_size;
+ for (j = i + 1; j < shnum; ++j) {
+ ML_(img_get)(&a_extra_shdr, dimg,
+ INDEX_BIS(shdr_dioff, j, shdr_dent_szB),
+ sizeof(a_shdr));
+ if (0 == ML_(img_strcmp_n)(dimg, shdr_strtab_dioff
+ + a_extra_shdr.sh_name, ".rodata", 7)) {
+ if (a_extra_shdr.sh_addr ==
+ VG_ROUNDUP(next_addr, a_extra_shdr.sh_addralign)) {
+ sh_size = VG_ROUNDUP(sh_size, a_extra_shdr.sh_addralign) + a_extra_shdr.sh_size;
+ }
+ next_addr = a_extra_shdr.sh_addr + a_extra_shdr.sh_size;
+ } else {
+ break;
+ }
+ }
+ vg_assert(di->rodata_size == sh_size);
+ vg_assert(di->rodata_avma + a_shdr.sh_addr + rw_dbias);
+ di->rodata_debug_svma = a_shdr.sh_addr;
+ di->rodata_debug_bias = di->rodata_bias +
+ di->rodata_svma - di->rodata_debug_svma;
+ TRACE_SYMTAB("acquiring .rodata debug svma = %#lx .. %#lx\n",
+ di->rodata_debug_svma,
+ di->rodata_debug_svma + di->rodata_size - 1);
+ TRACE_SYMTAB("acquiring .rodata debug bias = %#lx\n", (UWord)di->rodata_debug_bias);
+ }
+}
Bool ML_(read_elf_debug) ( struct _DebugInfo* di )
{
Word i, j;
@@ -3391,7 +3430,11 @@ Bool ML_(read_elf_debug) ( struct _DebugInfo* di )
FIND(text, rx)
FIND(data, rw)
FIND(sdata, rw)
- FIND(rodata, rw)
+ // https://bugs.kde.org/show_bug.cgi?id=476548
+ // special handling for rodata as adjacent
+ // rodata sections may have been merged in ML_(read_elf_object)
+ //FIND(rodata, rw)
+ find_rodata(i, ehdr_dimg.e_shnum, dimg, di, shdr_dioff, shdr_dent_szB, shdr_strtab_dioff, rw_dbias);
FIND(bss, rw)
FIND(sbss, rw)

View File

@ -2,12 +2,11 @@
Summary: Dynamic analysis tools to detect memory or thread bugs and profile
Name: %{?scl_prefix}valgrind
Version: 3.22.0
Release: 2%{?dist}
Version: 3.23.0
Release: 4%{?dist}
Epoch: 1
License: GPLv2+
URL: https://www.valgrind.org/
Group: Development/Debuggers
# Are we building for a Software Collection?
%{?scl:%global is_scl 1}
@ -15,7 +14,7 @@ Group: Development/Debuggers
# We never want the openmpi subpackage when building a software collecton.
# We always want it for fedora.
# We only want it for older rhel. But not s390x for too old rhel.
# We only want it for older rhel.
# And on fedora > 39 i386 dropped openmpi.
%if %{is_scl}
%global build_openmpi 0
@ -31,11 +30,7 @@ Group: Development/Debuggers
%if 0%{?rhel} > 7
%global build_openmpi 0
%else
%ifarch s390x
%global build_openmpi (%{?rhel} > 6)
%else
%global build_openmpi 1
%endif
%global build_openmpi 1
%endif
%endif
%endif
@ -55,17 +50,11 @@ Group: Development/Debuggers
# Whether to run the full regtest or only a limited set
# The full regtest includes gdb_server integration tests
# and experimental tools.
# Only run full regtests on fedora, but not on older rhel
# or when creating scl, the gdb_server tests might hang.
# Don't run them when creating scl, the gdb_server tests might hang.
%if %{is_scl}
%global run_full_regtest 0
%else
%if 0%{?fedora}
%global run_full_regtest 1
%endif
%if 0%{?rhel}
%global run_full_regtest (%rhel >= 7)
%endif
%global run_full_regtest 1
%endif
# Generating minisymtabs doesn't really work for the staticly linked
@ -89,9 +78,28 @@ Patch3: valgrind-3.16.0-some-stack-protector.patch
# Add some -Wl,z,now.
Patch4: valgrind-3.16.0-some-Wl-z-now.patch
# valgrind 3.22.0 fails on assertion when loading debuginfo
# https://bugs.kde.org/show_bug.cgi?id=476548
Patch5: valgrind-3.22.0-rodata.patch
# Patches from upstream VALGRIND_3_23_BRANCH
Patch5: 0001-Prepare-NEWS-for-branch-3.23-fixes.patch
Patch6: 0002-486180-MIPS-VexGuestArchState-has-no-member-named-gu.patch
Patch7: 0003-Bug-486293-memccpy-false-positives.patch
Patch8: 0004-Bug-486569-linux-inotify_init-syscall-wrapper-missin.patch
Patch9: 0005-aarch64-frinta-and-frinta-vector-instructions.patch
Patch10: 0006-mips-skip-using-shared-syscall-numbers-for-mips32.patch
Patch11: 0007-Fix-uninitialized-err-in-handle_extension.patch
Patch12: 0008-Avoid-use-of-guest_IP_AT_SYSCALL-in-handle_extension.patch
Patch13: 0009-s390x-Minor-fixes-in-extension-s390x.c.patch
Patch14: 0010-Bug-453044-gbserver_tests-failures-in-aarch64.patch
Patch15: 0011-Linux-regtest-reallocarray-needs-malloc.h.patch
Patch16: 0012-Bug-487439-SIGILL-in-JDK11-JDK17.patch
Patch17: 0013-Don-t-leave-fds-created-with-log-file-xml-file-or-lo.patch
Patch18: 0014-Close-both-internal-pipe-fds-after-VG_-fork-in-paren.patch
Patch19: 0015-Don-t-allow-programs-calling-fnctl-on-valgrind-s-own.patch
patch20: 0016-mips-skip-using-shared-syscall-numbers-for-mips64.patch
patch21: 0017-gdbserver_tests-filters-remove-python-rpm-module-loa.patch
patch22: 0018-Implement-VMOVQ-xmm1-xmm2-m64.patch
patch23: 0019-arm64-Fix-fcvtas-instruction.patch
patch24: 0020-gdbserver_tests-filters-remove-more-verbose-python-r.patch
patch25: 0021-Avoid-dev-inode-check-on-btrfs-with-sanity-level-3.patch
BuildRequires: make
BuildRequires: glibc-devel
@ -131,19 +139,12 @@ BuildRequires: elfutils-debuginfod-client
Recommends: elfutils-debuginfod-client
%endif
# For running the testsuite.
# Some of the python scripts require python 3.9+
BuildRequires: python3.11
BuildRequires: python3.11-rpm-macros
BuildRequires: python3-devel
%{?scl:Requires:%scl_runtime}
# We need to fixup selinux file context when doing a scl build.
# In RHEL6 we might need to fix up the labels even though the
# meta package sets up a fs equivalence. See post.
%if 0%{?rhel} == 6
%{?scl:Requires(post): /sbin/restorecon}
%endif
# We could use %%valgrind_arches as defined in redhat-rpm-config
# But that is really for programs using valgrind, it defines the
# set of architectures that valgrind works correctly on.
@ -197,7 +198,6 @@ profiler (callgrind), and a heap profiler (massif).
%package devel
Summary: Development files for valgrind aware programs
Group: Development/Debuggers
Requires: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release}
%description devel
@ -206,7 +206,6 @@ Header files and libraries for development of valgrind aware programs.
%if %{build_tools_devel}
%package tools-devel
Summary: Development files for building valgrind tools.
Group: Development/Debuggers
Requires: %{?scl_prefix}valgrind-devel = %{epoch}:%{version}-%{release}
Provides: %{name}-static = %{epoch}:%{version}-%{release}
@ -217,7 +216,6 @@ Header files and libraries for development of valgrind tools.
%if %{build_openmpi}
%package openmpi
Summary: OpenMPI support for valgrind
Group: Development/Debuggers
Requires: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release}
%description openmpi
@ -231,29 +229,43 @@ Valgrind User Manual for details.
%patch -P1 -p1
%patch -P2 -p1
# Old rhel gcc doesn't have -fstack-protector-strong.
%if 0%{?fedora} || 0%{?rhel} >= 7
%patch -P3 -p1
%patch -P4 -p1
%endif
%patch -P5 -p1
%patch -P6 -p1
%patch -P7 -p1
%patch -P8 -p1
%patch -P9 -p1
%patch -P10 -p1
%patch -P11 -p1
%patch -P12 -p1
%patch -P13 -p1
%patch -P14 -p1
%patch -P15 -p1
%patch -P16 -p1
%patch -P17 -p1
%patch -P18 -p1
%patch -P19 -p1
%patch -P20 -p1
%patch -P21 -p1
%patch -P22 -p1
%patch -P23 -p1
%patch -P24 -p1
%patch -P25 -p1
%build
# LTO triggers undefined symbols in valgrind. But valgrind has a
# --enable-lto configure time option that we will use instead.
%define _lto_cflags %{nil}
# Some patches (might) touch Makefile.am or configure.ac files.
# Just always autoreconf so we don't need patches to prebuild files.
./autogen.sh
# Old openmpi-devel has version depended paths for mpicc.
%if %{build_openmpi}
%if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
%define mpiccpath %{!?scl:%{_libdir}}%{?scl:%{_root_libdir}}/openmpi/bin/mpicc
%else
%define mpiccpath %{!?scl:%{_libdir}}%{?scl:%{_root_libdir}}/openmpi/*/bin/mpicc
%endif
%else
# We explicitly don't want the libmpi wrapper. So make sure that configure
# doesn't pick some random mpi compiler that happens to be installed.
%define mpiccpath /bin/false
@ -305,13 +317,13 @@ export LDFLAGS
--with-mpicc=%{mpiccpath} \
%{only_arch} \
GDB=%{_bindir}/gdb \
--without-gdbscripts-dir
--with-gdbscripts-dir=%{_datadir}/gdb/auto-load
make %{?_smp_mflags}
%make_build
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
%make_install
mkdir docs/installed
mv $RPM_BUILD_ROOT%{_datadir}/doc/valgrind/* docs/installed/
rm -f docs/installed/*.ps
@ -373,7 +385,7 @@ cat /proc/cpuinfo
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
# Make sure no extra CFLAGS, CXXFLAGS or LDFLAGS leak through,
# the testsuite sets all flags necessary. See also configure above.
make %{?_smp_mflags} CFLAGS="" CXXFLAGS="" LDFLAGS="" check
%make_build CFLAGS="" CXXFLAGS="" LDFLAGS="" check
# Workaround https://bugzilla.redhat.com/show_bug.cgi?id=1434601
# for gdbserver tests.
@ -423,6 +435,8 @@ echo ===============END TESTING===============
# Was disabled in %%install to prevent debuginfo stripping.
%attr(0755,root,root) %{_libexecdir}/valgrind/vgpreload*-%{valarch}-*so
%{_mandir}/man1/*
%{_datadir}/gdb/auto-load/valgrind-monitor.py
%{_datadir}/gdb/auto-load/valgrind-monitor-def.py
%files devel
%dir %{_includedir}/valgrind
@ -466,6 +480,33 @@ fi
%endif
%changelog
* Fri Jul 12 2024 Mark Wielaard <mjw@redhat.com> - 3.23.0-4
Add upstream VALGRIND_3_23_BRANCH patches
0001-Prepare-NEWS-for-branch-3.23-fixes.patch
0002-486180-MIPS-VexGuestArchState-has-no-member-named-gu.patch
0003-Bug-486293-memccpy-false-positives.patch
0004-Bug-486569-linux-inotify_init-syscall-wrapper-missin.patch
0005-aarch64-frinta-and-frinta-vector-instructions.patch
0006-mips-skip-using-shared-syscall-numbers-for-mips32.patch
0007-Fix-uninitialized-err-in-handle_extension.patch
0008-Avoid-use-of-guest_IP_AT_SYSCALL-in-handle_extension.patch
0009-s390x-Minor-fixes-in-extension-s390x.c.patch
0010-Bug-453044-gbserver_tests-failures-in-aarch64.patch
0011-Linux-regtest-reallocarray-needs-malloc.h.patch
0012-Bug-487439-SIGILL-in-JDK11-JDK17.patch
0013-Don-t-leave-fds-created-with-log-file-xml-file-or-lo.patch
0014-Close-both-internal-pipe-fds-after-VG_-fork-in-paren.patch
0015-Don-t-allow-programs-calling-fnctl-on-valgrind-s-own.patch
0016-mips-skip-using-shared-syscall-numbers-for-mips64.patch
0017-gdbserver_tests-filters-remove-python-rpm-module-loa.patch
0018-Implement-VMOVQ-xmm1-xmm2-m64.patch
0019-arm64-Fix-fcvtas-instruction.patch
0020-gdbserver_tests-filters-remove-more-verbose-python-r.patch
0021-Avoid-dev-inode-check-on-btrfs-with-sanity-level-3.patch
* Fri Apr 26 2024 Mark Wielaard <mjw@redhat.com> - 3.23.0-1
- Upstream 3.23.0 final
* Wed Dec 6 2023 Mark Wielaard <mjw@redhat.com> - 3.22.0-2
- Add valgrind-3.22.0-rodata.patch
@ -478,9 +519,6 @@ fi
- Add cachegrind.h to valgrind-devel package
- Use %%patch -Pn instead of deprecated %%patchn
* Tue Jun 27 2023 Mark Wielaard <mjw@redhat.com> - 3.21.0-8
- BuildRequire python3.11
* Fri Jun 23 2023 Mark Wielaard <mjw@redhat.com> - 3.21.0-7
- Add valgrind-3.21.0-callgrind_control-no-strict.patch
- Add valgrind-3.21.0-realloc-again.patch
@ -496,14 +534,23 @@ fi
- Remove upstreamed patches
- Add valgrind-3.21.0-no-memcpy-replace-check.patch
* Wed May 25 2022 Mark Wielaard <mjw@redhat.com> - 3.19.0-3
- Add valgrind-3.19.0-s390x-memmem.patch
- Add valgrind-3.19.0-ld-so-strncmp.patch
* Tue Apr 19 2022 Mark Wielaard <mjw@redhat.com> - 3.19.0-1
- Upgrade to valgrind 3.19.0. Drop old patches.
* Thu Feb 10 2022 Mark Wielaard <mjw@redhat.com> - 3.18.1-7
* Thu Feb 10 2022 Mark Wielaard <mjw@redhat.com> - 3.18.1-9
- Add valgrind-3.18.1-arm64-atomics-rdm.patch
* Tue Nov 30 2021 Mark Wielaard <mjw@redhat.com> - 3.18.1-6
- Rebuild against fresh toolchain
* Thu Jan 13 2022 Mark Wielaard <mjw@redhat.com> - 3.18.1-8
- Add valgrind-3.18.1-ppc-hwcaps.patch
- Add valgrind-3.18.1-s390x-wflrx.patch
* Tue Dec 14 2021 Mark Wielaard <mjw@redhat.com> - 3.18.1-6
- Add valgrind-3.18.1-rseq-enosys.patch
- Add valgrind-3.18.1-s390x-vdso.patch
* Wed Nov 24 2021 Mark Wielaard <mjw@redhat.com> - 3.18.1-5
- Add valgrind-3.18.1-dhat-tests-copy.patch
@ -520,52 +567,204 @@ fi
- Add valgrind-3.18.1-condvar.patch
- Add valgrind-3.18.1-demangle-namespace.patch
* Wed Oct 20 2021 Mark Wielaard <mjw@redhat.com> - 3.18.1-1
* Thu Oct 21 2021 Mark Wielaard <mjw@redhat.com> - 3.18.1-1
- Update to upstream 3.18.1 final
* Thu Jun 24 2021 Mark Wielaard <mjw@redhat.com> - 3.17.0-5
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.17.0-12
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Aug 6 2021 Mark Wielaard <mjw@redhat.com> - 3.17.0-11
- Add valgrind-3.17.0-ppc64-statfs64.patch
* Tue Aug 3 2021 Mark Wielaard <mjw@redhat.com> - 3.17.0-10
- Add valgrind-3.17.0_start.patch
* Wed Jul 21 2021 Mark Wielaard <mjw@redhat.com> - 3.17.0-9
- Add valgrind-3.17.0-clone3.patch
* Sat Jul 17 2021 Mark Wielaard <mjw@redhat.com> - 3.17.0-8
- Add gdbserver_tests-update-filters-for-newer-glibc-gdb.patch
- Add helgrind-and-drd-suppression-libc-and-libpthread.patch
- Remove valgrind-3.9.0-helgrind-race-supp.patch
- Enable run_full_regtest.
* Thu Jun 24 2021 Mark Wielaard <mjw@redhat.com> - 3.17.0-6
- Add valgrind-3.17.0-s390-prep.patch
- Add valgrind-3.17.0-s390-z15.patch
- Add valgrind-3.17.0-s390-z13-vec-fix.patch
* Mon Jun 7 2021 Mark Wielaard <mjw@redhat.com> - 3.17.0-5
- Disable run_full_regtest.
* Thu Jun 3 2021 Mark Wielaard <mjw@redhat.com> - 3.17.0-4
- Update to upstream 3.17.0 final.
- Add valgrind-3.17.0-ppc64-isa-3.1{,tests}.patch
- Add valgrind-3.17.0-s390_insn_as_string.patch
- Add valgrind-3.17.0-debuginfod.patch
- Add valgrind-3.17.0-clone-parent-res.patch
- Add valgrind-3.17.0-s390x-tests-z14-workaround.patch
* Fri Dec 4 2020 Mark Wielaard <mjw@redhat.com> - 3.16.0-4
* Tue May 4 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-3
- Add valgrind-3.17.0-ppc64-isa-3.1{,tests}.patch
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.17.0-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Mar 22 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-1
- Update to upstream 3.17.0 final.
* Wed Mar 17 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-0.1.RC2
- Update to upstream 3.17.0-RC2
* Mon Mar 15 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-0.1.RC1
- Update to upstream 3.17.0-RC1
- Drop all upstreamed patches
* Wed Mar 3 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-20
- Add valgrind-3.16.1-arm64_sp_lr_fp_DwReg.patch
* Sun Feb 21 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-19
- Add valgrind-3.16.1-readdwarf-line.patch
* Sat Feb 6 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-18
- Update valgrind-3.16.1-open-proc-self-exe.patch to handle openat
* Sat Feb 6 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-17
- Add valgrind-3.16.1-open-proc-self-exe.patch
* Wed Feb 3 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-16
- Add valgrind-3.16.0-shmctl.patch
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.16.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jan 25 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-14
- Add valgrind-3.16.1-dwarf5.patch
* Fri Jan 8 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-13
- Add valgrind-3.16.1-ppc64-scv-hwcap.patch
* Sun Dec 20 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-12
- Add valgrind-3.16.1-ficlone.patch
- Add valgrind-3.16.1-arm64-expensive-cmp.patch
* Thu Dec 17 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-11
- Update valgrind-3.16.1-arm64-fma.patch
* Tue Dec 15 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-10
- Add valgrind-3.16.1-arm64-fma.patch
* Sun Dec 13 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-9
- Add valgrind-3.16.1-stxsibx-stxsihx.patch
* Thu Dec 3 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-8
- Update valgrind-3.16.1-s390x-z14-vector.patch
* Thu Dec 3 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-7
- Add valgrind-3.16.1-pthread-intercept.patch
- Add valgrind-3.16.1-s390_emit_load_mem.patch
- Add valgrind-3.16.1-s390x-z14-vector.patch
* Tue Oct 20 2020 Mark Wielaard <mjw@redhat.com> - 3.16.0-3
* Mon Nov 9 2020 Mark Wielaard <mjw@fedoraproject.org>
- Add BuildRequires which (#1895773)
* Fri Oct 16 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-6
- Add valgrind-3.16.1-faccessat2.patch
- Add valgrind-3.16.1-gdbserver_nlcontrolc.patch
- Add valgrind-3.16.1-PPC64BE-lsw.patch
* Tue Aug 18 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-5
- Update valgrind-3.16.1-epoll.patch
* Mon Jul 27 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-4
- Add valgrind-3.16.1-REX-prefix-JMP.patch
- Add valgrind-3.16.1-epoll.patch
- Add valgrind-3.16.1-sched_getsetattr.patch
- Add valgrind-3.16.1-dl_runtime_resolve.patch
* Wed Jun 24 2020 Mark Wielaard <mjw@redhat.com> - 3.16.0-2
- Add valgrind-3.16.0-ppc-L-field.patch
- Add valgrind-3.16.0-387-float.patch
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 3.16.1-3
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Thu May 28 2020 Mark Wielaard <mjw@redhat.com> - 3.16.0-1
* Wed Jul 8 2020 Jeff Law <law@redhat.org> - 3.16.1-2
- Disable LTO
* Tue Jun 23 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-1
- Update to upstream valgrind 3.16.1.
* Fri Jun 19 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-3
- Add valgrind-3.16.0-ppc-L-field.patch
* Wed May 27 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-2
- Apply stack-protector and -Wl,z,now patches.
* Wed May 27 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-1
- Update to upstream valgrind 3.16.0 final.
* Fri Feb 14 2020 Mark Wielaard <mjw@redhat.com> - 3.15.0-11
* Tue May 19 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-0.4.RC2
- Add docbook-dtds to BuildRequires.
* Tue May 19 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-0.3.RC2
- Update to upstream 3.16.0 RC2
* Fri May 1 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-0.2.GIT
- Update to upstream 3.16.0 branch point (commit 55cdb7c4e)
* Fri Apr 17 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-0.1.GIT
- Update to upstream 3.16.0-GIT (commit 52d02fe23)
- Drop all streamed patches.
* Wed Mar 4 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-20
- Add valgrind-3.15.0-z15.patch
* Fri Feb 28 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-19
- Add valgrind-3.15.0-time64.patch
- Add valgrind-3.15.0-arm-preadv2-pwritev2.patch
- Add valgrind-3.15.0-avx_estimate_insn-test.patch
- Add valgrind-3.15.0-gcc-10-x86-amd64-asm-test.patch
* Fri Feb 14 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-18
- Add valgrind-3.15.0-ppc64-sigframe.patch
* Thu Feb 13 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-17
- Add valgrind-3.15.0-glibc-dtv-supp.patch
* Wed Jan 29 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-16
- Add valgrind-3.15.0-s390x-HRcVec128.patch
* Mon Aug 5 2019 Mark Wielaard <mjw@redhat.com> - 3.15.0-10
- Add valgrind-3.15.0-preadv2-pwritev2.patch
* Wed Jan 29 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-15
- Don't use valgrind-3.15.0-ptrace-siginfo.patch on ppc64[le]
- Add valgrind-3.15.0-s390x-compare-and-signal.patch
* Wed May 29 2019 Mark Wielaard <mjw@redhat.com> - 3.15.0-9
* Fri Jan 24 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-14
- Add valgrind-3.15.0-gcc-10-i686-asm-test.patch
- Add valgrind-3.15.0-gcc10-ppc64-asm-constraints.patch
* Thu Jan 23 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-13
- Add valgrind-3.15.0-gcc-10-typedef-enum.patch
* Mon Sep 23 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-12
- Add valgrind-3.15.0-ptrace-siginfo.patch
* Mon Aug 5 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-11
- Add valgrind-3.15.0-preadv2-pwritev2.patch
- Add valgrind-3.15.0-arm-membarrier.patch
- Add valgrind-3.15.0-z14-misc.patch
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.15.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed May 29 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-9
- Add valgrind-3.15.0-pkey.patch
* Tue May 28 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-8
- Update valgrind-3.15.0-copy_file_range.patch.
- Add valgrind-3.15.0-avx-rdrand-f16c.patch.
* Fri May 24 2019 Mark Wielaard <mjw@redhat.com> - 3.15.0-6
- Update valgrind-3.15.0-copy_file_range.patch.
* Fri May 24 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-7
- Update valgrind-3.15.0-some-stack-protector.patch to include getoff.
- Add valgrind-3.15.0-some-Wl-z-now.patch
* Fri May 24 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-6
- Add valgrind-3.15.0-s390x-wrap-drd.patch
* Mon May 20 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-5
@ -573,32 +772,115 @@ fi
- Add valgrind-3.15.0-scalar-arm64.patch
- Add valgrind-3.15.0-scalar-x86.patch
* Wed May 8 2019 Mark Wielaard <mjw@redhat.com> - 3.15.0-4
- Add valgrind-3.15.0-copy_file_range.patch
* Tue May 7 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-4
- Add valgrind-3.15.0-arm64-ld-stpcpy.patch
* Tue May 7 2019 Mark Wielaard <mjw@redhat.com> - 3.15.0-2
* Sun May 5 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-3
- Add valgrind-3.15.0-copy_file_range.patch
* Thu Apr 25 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-2
- gdb has been fixed on fedora, run full regtests again.
- Add valgrind-3.15.0-ppc64-filter_gdb.patch
* Tue Apr 16 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-1
- On ppc64[be] -fexceptions is troublesome.
- valgrind-3.15.0 final
- clean up build flags
Remove upstreamed patches
- valgrind-3.15.0-arm64-Ity_F16.patch
- valgrind-3.15.0-filter-libc-futex.patch
- valgrind-3.15.0-mmap-32bit.patch
* Wed Apr 17 2019 Mark Wielaard <mjw@redhat.com> - 3.14.0-11
- Rebuilt with s390x-vec-facility-bit for 8.1.0 (#1669234)
* Sun Apr 14 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-0.8.RC2
- Adding of stack-protector flag should only be done with newer gcc.
- Older rpm macros didn't provide build_ldflags.
- Add valgrind-3.15.0-arm64-Ity_F16.patch
* Thu Jan 24 2019 Mark Wielaard <mjw@redhat.com> - 3.14.0-10
* Sun Apr 14 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-0.7.RC2
- Add valgrind-3.15.0-some-stack-protector.patch
* Sat Apr 13 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-0.6.RC2
- Pass through most (hardening) flags, except -O2, -fstack-protector
and -Wl,-z,now.
* Fri Apr 12 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-0.5.RC2
- No openmpi support on old s390x rhel.
- Disable s390x z13 support on rhel6 (too old binutils).
- Use an explicit ExclusiveArch, don't rely on %%valgrind_arches.
- Drop close_fds, it is no longer needed.
- Include any gdbserver_tests diffs for failing regtest.
* Thu Apr 11 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-0.4.RC2
- Update to 3.15.0.RC2.
- Drop upstreamed patches:
- valgrind-3.15.0-s390x-get-startregs-constraint.patch
- valgrind-3.15.0-missing-a-c.patch
- valgrind-3.15.0-libstdc++-supp.patch
- valgrind-3.15.0-dhat-x86.patch
- valgrind-3.15.0-gdb-output1.patch
- valgrind-3.15.0-gdb-output2.patch
- Update valgrind-3.15.0-mmap-32bit.patch to upstream version.
- gdb on f30 and rawhide is currently broken, don't run_full_regtest.
- Any glibc-devel version is.
- Drop rhel5 special case for tools-devel.
- Use /bin/true --help as sanity test.
* Wed Apr 10 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-0.3.RC1
- Enable full regtest on all fedora arches.
- Make sure that patched a.c is not newer than cgout-test.
- Update valgrind-3.15.0-gdb-output1.patch to upstream version.
- Add valgrind-3.15.0-filter-libc-futex.patch.
- Add valgrind-3.15.0-mmap-32bit.patch.
* Tue Apr 9 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-0.2.RC1
- Add valgrind-3.15.0-s390x-get-startregs-constraint.patch
- Add valgrind-3.15.0-missing-a-c.patch
- Add valgrind-3.15.0-libstdc++-supp.patch
- Add valgrind-3.15.0-dhat-x86.patch
- Add valgrind-3.15.0-gdb-output1.patch
- Add valgrind-3.15.0-gdb-output2.patch
* Mon Apr 8 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-0.1.RC1
- Remove patches to prebuild files and always ./autogen.sh.
- Only ever build primary arch. Put tools under libexec.
- Update to upstream 3.15.0-RC1.
- Drop all upstreamed patches.
* Mon Mar 4 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-16
- Add valgrind-3.14.0-gettid.patch
* Mon Mar 4 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-15
- Add valgrind-3.14.0-ppc64-quotactl.patch
* Thu Feb 21 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-14
- Add valgrind-3.14.0-ppc-subfe.patch
* Thu Feb 14 2019 Orion Poplawski <orion@nwra.com> - 1:3.14.0-13
- Rebuild for openmpi 3.1.3
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.14.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jan 24 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-11
- Add valgrind-3.14.0-s390x-vec-facility-bit.patch.
* Mon Jan 7 2019 Mark Wielaard <mjw@redhat.com> - 3.14.0-9
* Wed Jan 9 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-10
- Add valgrind-3.14.0-rsp-clobber.patch
- Add valgrind-3.14.0-subrange_type-count.patch
* Mon Dec 31 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-9
- Add valgrind-3.14.0-vbit-test-sec.patch
- Add valgrind-3.14.0-x86-Iop_Sar64.patch
- Add valgrind-3.14.0-power9-addex.patch
* Thu Dec 20 2018 Mark Wielaard <mjw@redhat.com> - 3.14.0-8
- Update valgrind-3.14.0-jm-vmx-constraints.patch for ppc64. (#1658680)
* Thu Dec 20 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-8
- Update valgrind-3.14.0-jm-vmx-constraints.patch for ppc64.
- Show all diff files in check, not just the main/default one.
* Mon Dec 17 2018 Mark Wielaard <mjw@redhat.com> - 3.14.0-7
* Fri Dec 14 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-7
- Add valgrind-3.14.0-arm64-ptrace-traceme.patch
- Add valgrind-3.14.0-mc_translate-vecret.patch
* Wed Dec 12 2018 Mark Wielaard <mjw@redhat.com> - 3.14.0-6
* Wed Dec 12 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-6
- Add valgrind-3.14.0-final_tidyup.patch
- Add valgrind-3.14.0-ppc64-ldbrx.patch
- Add valgrind-3.14.0-ppc64-unaligned-words.patch
@ -611,42 +893,45 @@ fi
- Add valgrind-3.14.0-sigkill.patch
- Add valgrind-3.14.0-ppc64-ptrace.patch
* Tue Dec 4 2018 Mark Wielaard <mjw@redhat.com>
- Add valgrind-3.14.0-wcsncmp.patch (#1655642)
* Sat Dec 1 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-5
- Add valgrind-3.14.0-wcsncmp.patch (#1645971)
- Replace valgrind-3.14.0-s390x-vec-float-point-{code,test}.patch
with upstream versions. (#1525405)
with upstream versions.
* Fri Nov 23 2018 Mark Wielaard <mjw@redhat.com> - 3.14.0-4
* Fri Nov 23 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-4
- Add valgrind-3.14.0-get_otrack_shadow_offset_wrk-ppc.patch,
valgrind-3.14.0-new-strlen-IROps.patch,
valgrind-3.14.0-ppc-instr-new-IROps.patch,
valgrind-3.14.0-memcheck-new-IROps.patch,
valgrind-3.14.0-ppc-frontend-new-IROps.patch,
valgrind-3.14.0-transform-popcount64-ctznat64.patch and
valgrind-3.14.0-enable-ppc-Iop_Sar_Shr8.patch (#1532205)
valgrind-3.14.0-enable-ppc-Iop_Sar_Shr8.patch (#1652926)
* Wed Nov 21 2018 Mark Wielaard <mjw@redhat.com> - 3.14.0-3
* Wed Nov 21 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-3
- Add valgrind-3.14.0-s390z-more-z13-fixes.patch.
* Tue Nov 20 2018 Mark Wielaard <mjw@redhat.com> - 3.14.0-2
* Tue Nov 20 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-2
- Add valgrind-3.14.0-s390x-fix-reg-alloc-vr-vs-fpr.patch.
- Add valgrind-3.14.0-s390x-sign-extend-lochi.patch.
- Add valgrind-3.14.0-s390x-vec-reg-vgdb.patch.
- Add valgrind-3.14.0-s390x-vec-float-point-code.patch
and valgrind-3.14.0-s390x-vec-float-point-tests.patch
- Only run full regtests on x86_64 on fedora or latest rhel.
- Disable full regtests on fedora everywhere.
* Tue Oct 9 2018 Mark Wielaard <mjw@redhat.com> - 3.14.0-1
- valgrind 3.14.0 (#1569600).
- Enable s390x again.
* Tue Oct 9 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-1
- valgrind 3.14.0 final.
* Fri Aug 10 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-29
* Thu Oct 4 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-0.2.RC2
- Upgrade to RC2.
- Drop valgrind-3.14.0-add-vector-h.patch.
* Fri Sep 14 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-0.1.GIT
- New upstream (pre-)release.
- Add valgrind-3.14.0-add-vector-h.patch.
* Fri Aug 10 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-28
- Add valgrind-3.13.0-utime.patch
* Thu Aug 9 2018 Florian Weimer <fweimer@redhat.com> - 1:3.13.0-28
- Rebuild to remove s390x packages due to lack of z13 support (#1525405)
* Fri Aug 3 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-27
- Add valgrind-3.13.0-ppc64-xsmaxcdp.patch
@ -657,7 +942,7 @@ fi
* Tue Jul 31 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-25
- Add valgrind-3.13.0-x86-arch_prctl.patch (#1610304)
* Mon Jul 30 2018 Florian Weimer <fweimer@redhat.com> - 3.13.0-24
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 3.13.0-24
- Rebuild with fixed binutils
* Fri Jul 27 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-23