Add valgrind-3.22.0-valgrind-monitor-python-re.patch
This commit is contained in:
parent
b0b6accc12
commit
b86a6d3e9f
32
valgrind-3.22.0-valgrind-monitor-python-re.patch
Normal file
32
valgrind-3.22.0-valgrind-monitor-python-re.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
commit 0fbfbe05028ad18efda786a256a2738d2c231ed4
|
||||||
|
Author: Mark Wielaard <mark@klomp.org>
|
||||||
|
Date: Fri Nov 17 13:31:52 2023 +0100
|
||||||
|
|
||||||
|
valgrind-monitor.py regular expressions should use raw strings
|
||||||
|
|
||||||
|
With python 3.12 gdb will produce the following SyntaxWarning when
|
||||||
|
loading valgrind-monitor-def.py:
|
||||||
|
|
||||||
|
/usr/share/gdb/auto-load/valgrind-monitor-def.py:214:
|
||||||
|
SyntaxWarning: invalid escape sequence '\['
|
||||||
|
if re.fullmatch("^0x[0123456789ABCDEFabcdef]+\[[^\[\]]+\]$", arg_str):
|
||||||
|
|
||||||
|
In a future python version this will become an SyntaxError.
|
||||||
|
|
||||||
|
Use a raw strings for the regular expression.
|
||||||
|
|
||||||
|
https://bugs.kde.org/show_bug.cgi?id=476708
|
||||||
|
|
||||||
|
diff --git a/coregrind/m_gdbserver/valgrind-monitor-def.py b/coregrind/m_gdbserver/valgrind-monitor-def.py
|
||||||
|
index b4e7b992d..d74b1590c 100644
|
||||||
|
--- a/coregrind/m_gdbserver/valgrind-monitor-def.py
|
||||||
|
+++ b/coregrind/m_gdbserver/valgrind-monitor-def.py
|
||||||
|
@@ -211,7 +211,7 @@ class Valgrind_ADDR_LEN_opt(Valgrind_Command):
|
||||||
|
For compatibility reason with the Valgrind gdbserver monitor command,
|
||||||
|
we detect and accept usages such as 0x1234ABCD[10]."""
|
||||||
|
def invoke(self, arg_str : str, from_tty : bool) -> None:
|
||||||
|
- if re.fullmatch("^0x[0123456789ABCDEFabcdef]+\[[^\[\]]+\]$", arg_str):
|
||||||
|
+ if re.fullmatch(r"^0x[0123456789ABCDEFabcdef]+\[[^\[\]]+\]$", arg_str):
|
||||||
|
arg_str = arg_str.replace("[", " ")
|
||||||
|
arg_str = arg_str.replace("]", " ")
|
||||||
|
eval_execute_2(self, arg_str,
|
@ -3,7 +3,7 @@
|
|||||||
Summary: Dynamic analysis tools to detect memory or thread bugs and profile
|
Summary: Dynamic analysis tools to detect memory or thread bugs and profile
|
||||||
Name: %{?scl_prefix}valgrind
|
Name: %{?scl_prefix}valgrind
|
||||||
Version: 3.22.0
|
Version: 3.22.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://www.valgrind.org/
|
URL: https://www.valgrind.org/
|
||||||
@ -88,6 +88,10 @@ Patch3: valgrind-3.16.0-some-stack-protector.patch
|
|||||||
# Add some -Wl,z,now.
|
# Add some -Wl,z,now.
|
||||||
Patch4: valgrind-3.16.0-some-Wl-z-now.patch
|
Patch4: valgrind-3.16.0-some-Wl-z-now.patch
|
||||||
|
|
||||||
|
# valgrind-monitor.py regular expressions should use raw strings
|
||||||
|
# https://bugs.kde.org/show_bug.cgi?id=476708
|
||||||
|
Patch5: valgrind-3.22.0-valgrind-monitor-python-re.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
|
|
||||||
@ -226,6 +230,8 @@ Valgrind User Manual for details.
|
|||||||
%patch -P4 -p1
|
%patch -P4 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%patch -P5 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# LTO triggers undefined symbols in valgrind. Valgrind has a --enable-lto
|
# LTO triggers undefined symbols in valgrind. Valgrind has a --enable-lto
|
||||||
# configure time option, but that doesn't seem to help.
|
# configure time option, but that doesn't seem to help.
|
||||||
@ -458,6 +464,9 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 17 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-2
|
||||||
|
- Add valgrind-3.22.0-valgrind-monitor-python-re.patch
|
||||||
|
|
||||||
* Tue Oct 31 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-1
|
* Tue Oct 31 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-1
|
||||||
- Upstream 3.22.0 final
|
- Upstream 3.22.0 final
|
||||||
- BuildRequires elfutils-debuginfod for testing
|
- BuildRequires elfutils-debuginfod for testing
|
||||||
|
Loading…
Reference in New Issue
Block a user