[SCM] qtdeclarative packaging branch, experimental, updated. debian/5.9.0-beta3-2-16-gcbf75a2
Dmitry Shachnev
mitya57 at moszumanska.debian.org
Sat Jun 17 11:18:29 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtdeclarative.git;a=commitdiff;h=9cb2da4
The following commit has been merged in the experimental branch:
commit 9cb2da471b1cc936736301a7e7f6289b963c60ca
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Sat Jun 17 13:55:21 2017 +0300
Add a patch that should fix crashes on big endian systems.
---
debian/changelog | 2 +
debian/patches/big_endian.patch | 98 +++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 101 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 176c0e2..269c45b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
qtdeclarative-opensource-src (5.9.0-2) UNRELEASED; urgency=medium
+ [ Dmitry Shachnev ]
+ * Add a patch that should fix crashes on big endian systems.
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Sat, 17 Jun 2017 13:54:29 +0300
diff --git a/debian/patches/big_endian.patch b/debian/patches/big_endian.patch
new file mode 100644
index 0000000..ca8a8b2
--- /dev/null
+++ b/debian/patches/big_endian.patch
@@ -0,0 +1,98 @@
+Description: fix QML compiler crashes on big endian systems
+Author: Dmitry Shachnev <mitya57 at debian.org>
+Forwarded: https://codereview.qt-project.org/197746
+Last-Update: 2017-06-17
+
+--- a/src/qml/compiler/qqmlirbuilder.cpp
++++ b/src/qml/compiler/qqmlirbuilder.cpp
+@@ -1425,7 +1425,7 @@
+ }
+
+ // write objects
+- quint32 *objectTable = reinterpret_cast<quint32*>(data + qmlUnit->offsetToObjects);
++ QV4::CompiledData::LEUInt32 *objectTable = reinterpret_cast<QV4::CompiledData::LEUInt32*>(data + qmlUnit->offsetToObjects);
+ char *objectPtr = data + qmlUnit->offsetToObjects + objectOffsetTableSize;
+ for (int i = 0; i < output.objects.count(); ++i) {
+ const Object *o = output.objects.at(i);
+@@ -1467,7 +1467,7 @@
+ objectToWrite->offsetToNamedObjectsInComponent = nextOffset;
+ nextOffset += objectToWrite->nNamedObjectsInComponent * sizeof(quint32);
+
+- quint32 *functionsTable = reinterpret_cast<quint32*>(objectPtr + objectToWrite->offsetToFunctions);
++ QV4::CompiledData::LEUInt32 *functionsTable = reinterpret_cast<QV4::CompiledData::LEUInt32*>(objectPtr + objectToWrite->offsetToFunctions);
+ for (const Function *f = o->firstFunction(); f; f = f->next)
+ *functionsTable++ = o->runtimeFunctionIndices.at(f->index);
+
+@@ -1493,7 +1493,7 @@
+ bindingPtr = writeBindings(bindingPtr, o, &QV4::CompiledData::Binding::isValueBindingToAlias);
+ Q_ASSERT((bindingPtr - objectToWrite->offsetToBindings - objectPtr) / sizeof(QV4::CompiledData::Binding) == unsigned(o->bindingCount()));
+
+- quint32 *signalOffsetTable = reinterpret_cast<quint32*>(objectPtr + objectToWrite->offsetToSignals);
++ QV4::CompiledData::LEUInt32 *signalOffsetTable = reinterpret_cast<QV4::CompiledData::LEUInt32*>(objectPtr + objectToWrite->offsetToSignals);
+ quint32 signalTableSize = 0;
+ char *signalPtr = objectPtr + nextOffset;
+ for (const Signal *s = o->firstSignal(); s; s = s->next) {
+@@ -1513,7 +1513,7 @@
+ signalPtr += size;
+ }
+
+- quint32 *namedObjectInComponentPtr = reinterpret_cast<quint32*>(objectPtr + objectToWrite->offsetToNamedObjectsInComponent);
++ QV4::CompiledData::LEUInt32 *namedObjectInComponentPtr = reinterpret_cast<QV4::CompiledData::LEUInt32*>(objectPtr + objectToWrite->offsetToNamedObjectsInComponent);
+ for (int i = 0; i < o->namedObjectsInComponent.count; ++i) {
+ *namedObjectInComponentPtr++ = o->namedObjectsInComponent.at(i);
+ }
+--- a/src/qml/compiler/qv4compileddata.cpp
++++ b/src/qml/compiler/qv4compileddata.cpp
+@@ -99,6 +99,7 @@
+ , runtimeLookups(0)
+ , runtimeRegularExpressions(0)
+ , runtimeClasses(0)
++ , constants(nullptr)
+ , totalBindingsCount(0)
+ , totalParserStatusCount(0)
+ , totalObjectCount(0)
+@@ -239,6 +240,7 @@
+ runtimeFunctions.clear();
+ #if Q_BYTE_ORDER == Q_BIG_ENDIAN
+ delete [] constants;
++ constants = nullptr;
+ #endif
+ }
+
+--- a/src/qml/compiler/qv4compiler.cpp
++++ b/src/qml/compiler/qv4compiler.cpp
+@@ -335,29 +335,29 @@
+ function->codeSize = 0;
+
+ // write formals
+- quint32 *formals = (quint32 *)(f + function->formalsOffset);
++ CompiledData::LEUInt32 *formals = (CompiledData::LEUInt32 *)(f + function->formalsOffset);
+ for (int i = 0; i < irFunction->formals.size(); ++i)
+ formals[i] = getStringId(*irFunction->formals.at(i));
+
+ // write locals
+- quint32 *locals = (quint32 *)(f + function->localsOffset);
++ CompiledData::LEUInt32 *locals = (CompiledData::LEUInt32 *)(f + function->localsOffset);
+ for (int i = 0; i < irFunction->locals.size(); ++i)
+ locals[i] = getStringId(*irFunction->locals.at(i));
+
+ // write QML dependencies
+- quint32 *writtenDeps = (quint32 *)(f + function->dependingIdObjectsOffset);
++ CompiledData::LEUInt32 *writtenDeps = (CompiledData::LEUInt32 *)(f + function->dependingIdObjectsOffset);
+ for (int id : irFunction->idObjectDependencies) {
+ Q_ASSERT(id >= 0);
+ *writtenDeps++ = static_cast<quint32>(id);
+ }
+
+- writtenDeps = (quint32 *)(f + function->dependingContextPropertiesOffset);
++ writtenDeps = (CompiledData::LEUInt32 *)(f + function->dependingContextPropertiesOffset);
+ for (auto property : irFunction->contextObjectPropertyDependencies) {
+ *writtenDeps++ = property.key(); // property index
+ *writtenDeps++ = property.value(); // notify index
+ }
+
+- writtenDeps = (quint32 *)(f + function->dependingScopePropertiesOffset);
++ writtenDeps = (CompiledData::LEUInt32 *)(f + function->dependingScopePropertiesOffset);
+ for (auto property : irFunction->scopeObjectPropertyDependencies) {
+ *writtenDeps++ = property.key(); // property index
+ *writtenDeps++ = property.value(); // notify index
diff --git a/debian/patches/series b/debian/patches/series
index 71cb1c0..418c1bc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
disableopengltests.patch
fix_test_remove_qlibraryinfo.patch
Do-not-make-lack-of-SSE2-support-on-x86-32-fatal.patch
+big_endian.patch
--
qtdeclarative packaging
More information about the pkg-kde-commits
mailing list