[packages/qt4] quick and ugly hack for infinite loop in QMap
atler
atler at pld-linux.org
Wed Sep 22 16:17:08 CEST 2021
commit db331ed1a3162a7c83243fd56699e27f9270d3ef
Author: Jan Palus <atler at pld-linux.org>
Date: Wed Sep 22 16:06:26 2021 +0200
quick and ugly hack for infinite loop in QMap
as noted by qboosh in
https://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2021-September/026364.html
the root cause is essentially a mismatch between address of
QMapData::shared_null as seen in library and application. since
`shared_null` acts basically as '\0' in strings -- stop point, only
compared by address -- just make sure application always receives same
address as library. still to be determined why that happens exactly
(all of my attempts at reduced reproducer failed) and proper fix should
be delivered.
qmap_inf_loop.patch | 11 +++++++++++
qt4.spec | 2 ++
2 files changed, 13 insertions(+)
---
diff --git a/qt4.spec b/qt4.spec
index 030be06..9b703a3 100644
--- a/qt4.spec
+++ b/qt4.spec
@@ -133,6 +133,7 @@ Patch51: gcc9.patch
Patch52: gcc9-qforeach.patch
Patch53: cxx11.patch
Patch54: gcc11.patch
+Patch55: qmap_inf_loop.patch
URL: http://qt-project.org/
%{?with_ibase:BuildRequires: Firebird-devel}
%{?with_openvg:BuildRequires: Mesa-libOpenVG-devel}
@@ -1574,6 +1575,7 @@ Programas exemplo para o Qt versão.
%patch52 -p1
%patch53 -p1
%patch54 -p1
+%patch55 -p1
%{__sed} -i -e 's,usr/X11R6/,usr/g,' mkspecs/linux-g++-64/qmake.conf \
mkspecs/common/linux.conf
diff --git a/qmap_inf_loop.patch b/qmap_inf_loop.patch
new file mode 100644
index 0000000..ad98fa7
--- /dev/null
+++ b/qmap_inf_loop.patch
@@ -0,0 +1,11 @@
+--- qt-everywhere-opensource-src-4.8.7.orig/src/corelib/tools/qmap.h 2015-05-07 14:14:48.000000000 +0000
++++ qt-everywhere-opensource-src-4.8.7/src/corelib/tools/qmap.h 2021-09-22 13:03:35.852354885 +0000
+@@ -179,7 +179,7 @@
+ }
+
+ public:
+- inline QMap() : d(&QMapData::shared_null) { d->ref.ref(); }
++ inline QMap() : d(QMapData::shared_null.backward) { d->ref.ref(); }
+ inline QMap(const QMap<Key, T> &other) : d(other.d)
+ { d->ref.ref(); if (!d->sharable) detach(); }
+ inline ~QMap() { if (!d) return; if (!d->ref.deref()) freeData(d); }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qt4.git/commitdiff/db331ed1a3162a7c83243fd56699e27f9270d3ef
More information about the pld-cvs-commit
mailing list