summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2023-03-02 11:44:29 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2023-03-02 11:44:29 +0200
commit31eb423e9632f2e96dff1ecafd2dd10957b632c9 (patch)
tree1fd35f5751ef64f95fd5aa3242566dacdf6a2f91
parent8d8c48ec92c5fafb2acd33a0b82d0830e771d7b9 (diff)
parent055764e3398af64d341d4c16ce00737c56391849 (diff)
Merge remote-tracking branch 'origin/tqtc/lts-6.2.6' into tqtc/lts-6.2-opensource
-rw-r--r--.cmake.conf2
-rw-r--r--.qmake.conf2
-rw-r--r--src/3rdparty/open62541/open62541.h26
-rw-r--r--src/3rdparty/open62541/patches/0001-fix-core-use-of-compound-volatile-operations-depreca.patch91
-rw-r--r--src/opcua/x509/qopcuakeypair.h6
5 files changed, 113 insertions, 14 deletions
diff --git a/.cmake.conf b/.cmake.conf
index 940e347..6f32ba4 100644
--- a/.cmake.conf
+++ b/.cmake.conf
@@ -1,2 +1,2 @@
-set(QT_REPO_MODULE_VERSION "6.2.5")
+set(QT_REPO_MODULE_VERSION "6.2.6")
set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "")
diff --git a/.qmake.conf b/.qmake.conf
index a1b8222..1bd06ca 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -3,4 +3,4 @@ load(qt_build_config)
ROOT_SOURCE_DIR=$$PWD
ROOT_BUILD_DIR=$$shadowed($$PWD)
-MODULE_VERSION = 6.2.5
+MODULE_VERSION = 6.2.6
diff --git a/src/3rdparty/open62541/open62541.h b/src/3rdparty/open62541/open62541.h
index 7514fbb..906e839 100644
--- a/src/3rdparty/open62541/open62541.h
+++ b/src/3rdparty/open62541/open62541.h
@@ -1259,8 +1259,10 @@ UA_atomic_addUInt32(volatile uint32_t *addr, uint32_t increase) {
return __sync_add_and_fetch(addr, increase);
#endif
#else
- *addr += increase;
- return *addr;
+ uint32_t accu = *addr;
+ accu += increase;
+ *addr = accu;
+ return accu;
#endif
}
@@ -1273,8 +1275,10 @@ UA_atomic_addSize(volatile size_t *addr, size_t increase) {
return __sync_add_and_fetch(addr, increase);
#endif
#else
- *addr += increase;
- return *addr;
+ size_t accu = *addr;
+ accu += increase;
+ *addr = accu;
+ return accu;
#endif
}
@@ -1287,8 +1291,10 @@ UA_atomic_subUInt32(volatile uint32_t *addr, uint32_t decrease) {
return __sync_sub_and_fetch(addr, decrease);
#endif
#else
- *addr -= decrease;
- return *addr;
+ uint32_t accu = *addr;
+ accu -= decrease;
+ *addr = accu;
+ return accu;
#endif
}
@@ -1301,8 +1307,10 @@ UA_atomic_subSize(volatile size_t *addr, size_t decrease) {
return __sync_sub_and_fetch(addr, decrease);
#endif
#else
- *addr -= decrease;
- return *addr;
+ size_t accu = *addr;
+ accu -= decrease;
+ *addr = accu;
+ return accu;
#endif
}
@@ -22533,7 +22541,7 @@ UA_constantTimeEqual(const void *ptr1, const void *ptr2, size_t length) {
volatile UA_Byte c = 0;
for(size_t i = 0; i < length; ++i) {
UA_Byte x = a[i], y = b[i];
- c |= x ^ y;
+ c = c | (x ^ y);
}
return !c;
}
diff --git a/src/3rdparty/open62541/patches/0001-fix-core-use-of-compound-volatile-operations-depreca.patch b/src/3rdparty/open62541/patches/0001-fix-core-use-of-compound-volatile-operations-depreca.patch
new file mode 100644
index 0000000..ad2d07f
--- /dev/null
+++ b/src/3rdparty/open62541/patches/0001-fix-core-use-of-compound-volatile-operations-depreca.patch
@@ -0,0 +1,91 @@
+From 464966135e5cc7af30d9a3f6bdc81be937b95ac3 Mon Sep 17 00:00:00 2001
+From: Marc Mutz <marc.mutz@qt.io>
+Date: Fri, 1 Jul 2022 09:53:55 +0200
+Subject: [PATCH] fix(core): use of compound volatile operations (deprecated in
+ C++20)
+
+C++20 deprecated compound volatile operations, so this code fails to
+compile in C++20 mode due to -Werror.
+
+Fix by separating loading and saving of the value, which, in the case
+of architecture_definitions.h, even reduces the per-operation loads
+from two to one.
+
+Fixes: #5247
+---
+ include/open62541/architecture_definitions.h | 24 +++++++++++++-------
+ include/open62541/util.h | 2 +-
+ 2 files changed, 17 insertions(+), 9 deletions(-)
+
+diff --git a/include/open62541/architecture_definitions.h b/include/open62541/architecture_definitions.h
+index f22f401d..15a21505 100644
+--- a/include/open62541/architecture_definitions.h
++++ b/include/open62541/architecture_definitions.h
+@@ -456,8 +456,10 @@ UA_atomic_addUInt32(volatile uint32_t *addr, uint32_t increase) {
+ return __sync_add_and_fetch(addr, increase);
+ #endif
+ #else
+- *addr += increase;
+- return *addr;
++ uint32_t accu = *addr;
++ accu += increase;
++ *addr = accu;
++ return accu;
+ #endif
+ }
+
+@@ -470,8 +472,10 @@ UA_atomic_addSize(volatile size_t *addr, size_t increase) {
+ return __sync_add_and_fetch(addr, increase);
+ #endif
+ #else
+- *addr += increase;
+- return *addr;
++ size_t accu = *addr;
++ accu += increase;
++ *addr = accu;
++ return accu;
+ #endif
+ }
+
+@@ -484,8 +488,10 @@ UA_atomic_subUInt32(volatile uint32_t *addr, uint32_t decrease) {
+ return __sync_sub_and_fetch(addr, decrease);
+ #endif
+ #else
+- *addr -= decrease;
+- return *addr;
++ uint32_t accu = *addr;
++ accu -= decrease;
++ *addr = accu;
++ return accu;
+ #endif
+ }
+
+@@ -498,8 +504,10 @@ UA_atomic_subSize(volatile size_t *addr, size_t decrease) {
+ return __sync_sub_and_fetch(addr, decrease);
+ #endif
+ #else
+- *addr -= decrease;
+- return *addr;
++ size_t accu = *addr;
++ accu -= decrease;
++ *addr = accu;
++ return accu;
+ #endif
+ }
+
+diff --git a/include/open62541/util.h b/include/open62541/util.h
+index 79e49f20..9f3b5fea 100644
+--- a/include/open62541/util.h
++++ b/include/open62541/util.h
+@@ -213,7 +213,7 @@ UA_constantTimeEqual(const void *ptr1, const void *ptr2, size_t length) {
+ volatile UA_Byte c = 0;
+ for(size_t i = 0; i < length; ++i) {
+ UA_Byte x = a[i], y = b[i];
+- c |= x ^ y;
++ c = c | (x ^ y);
+ }
+ return !c;
+ }
+--
+2.25.1
+
diff --git a/src/opcua/x509/qopcuakeypair.h b/src/opcua/x509/qopcuakeypair.h
index dbd1197..8cc1320 100644
--- a/src/opcua/x509/qopcuakeypair.h
+++ b/src/opcua/x509/qopcuakeypair.h
@@ -37,9 +37,9 @@
#ifndef QOPCUAKEYPAIR_H
#define QOPCUAKEYPAIR_H
-#include <QObject>
-#include <QString>
-#include <QSharedPointer>
+#include <QtCore/qobject.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qsharedpointer.h>
#include <QtOpcUa/qopcuaglobal.h>
QT_BEGIN_NAMESPACE