diff mbox

[1/1] qt5declarative: backport 'Fix alignment issue on ARMv7' patch to 5.9.1

Message ID 20170731171359.32471-1-petar.koretic@qaap.io
State Changes Requested
Headers show

Commit Message

Petar Koretic July 31, 2017, 5:13 p.m. UTC
This resolves a QML issues reported in
https://bugreports.qt.io/browse/QTBUG-61522 that will be fixed in the 5.9.2.

Signed-off-by: Petar Koretic <petar.koretic@qaap.io>
---
 .../0003-Fix-alignment-issue-on-ARMv7.patch        | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch

Comments

Thomas Petazzoni July 31, 2017, 5:33 p.m. UTC | #1
Hello,

On Mon, 31 Jul 2017 19:13:59 +0200, Petar Koretic wrote:
> This resolves a QML issues reported in
> https://bugreports.qt.io/browse/QTBUG-61522 that will be fixed in the 5.9.2.
> 
> Signed-off-by: Petar Koretic <petar.koretic@qaap.io>
> ---
>  .../0003-Fix-alignment-issue-on-ARMv7.patch        | 34 ++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
>  create mode 100644 package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
> 
> diff --git a/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch b/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch

Does this patch applies only to 5.9.1 ? If so, it should go in
package/qt5/qt5declarative/5.9.1/.

I can fixup the patch, just tell me if this issue is only applicable to
5.9.1 (I guess it is the case, but I prefer to ask).

Thanks,

Thomas
Petar Koretic July 31, 2017, 5:44 p.m. UTC | #2
Hi Thomas.

Thanks for the information.
It does affect and applies to Qt 5.8 (and 5.9.0) as well, just tested this
to confirm it.
Commit message needs fixing then, sorry.

Best regards,
Petar

On Mon, Jul 31, 2017 at 7:33 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> On Mon, 31 Jul 2017 19:13:59 +0200, Petar Koretic wrote:
> > This resolves a QML issues reported in
> > https://bugreports.qt.io/browse/QTBUG-61522 that will be fixed in the
> 5.9.2.
> >
> > Signed-off-by: Petar Koretic <petar.koretic@qaap.io>
> > ---
> >  .../0003-Fix-alignment-issue-on-ARMv7.patch        | 34
> ++++++++++++++++++++++
> >  1 file changed, 34 insertions(+)
> >  create mode 100644 package/qt5/qt5declarative/
> 0003-Fix-alignment-issue-on-ARMv7.patch
> >
> > diff --git a/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
> b/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
>
> Does this patch applies only to 5.9.1 ? If so, it should go in
> package/qt5/qt5declarative/5.9.1/.
>
> I can fixup the patch, just tell me if this issue is only applicable to
> 5.9.1 (I guess it is the case, but I prefer to ask).
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
>
Petar Koretic July 31, 2017, 5:48 p.m. UTC | #3
Doesn't affect or apply to 5.6, if that was actually the question.

Best regards,
Petar

On Mon, Jul 31, 2017 at 7:44 PM, Petar Koretic <petar.koretic@qaap.io>
wrote:

> Hi Thomas.
>
> Thanks for the information.
> It does affect and applies to Qt 5.8 (and 5.9.0) as well, just tested this
> to confirm it.
> Commit message needs fixing then, sorry.
>
> Best regards,
> Petar
>
>
> On Mon, Jul 31, 2017 at 7:33 PM, Thomas Petazzoni <thomas.petazzoni@free-
> electrons.com> wrote:
>
>> Hello,
>>
>> On Mon, 31 Jul 2017 19:13:59 +0200, Petar Koretic wrote:
>> > This resolves a QML issues reported in
>> > https://bugreports.qt.io/browse/QTBUG-61522 that will be fixed in the
>> 5.9.2.
>> >
>> > Signed-off-by: Petar Koretic <petar.koretic@qaap.io>
>> > ---
>> >  .../0003-Fix-alignment-issue-on-ARMv7.patch        | 34
>> ++++++++++++++++++++++
>> >  1 file changed, 34 insertions(+)
>> >  create mode 100644 package/qt5/qt5declarative/000
>> 3-Fix-alignment-issue-on-ARMv7.patch
>> >
>> > diff --git a/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
>> b/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
>>
>> Does this patch applies only to 5.9.1 ? If so, it should go in
>> package/qt5/qt5declarative/5.9.1/.
>>
>> I can fixup the patch, just tell me if this issue is only applicable to
>> 5.9.1 (I guess it is the case, but I prefer to ask).
>>
>> Thanks,
>>
>> Thomas
>> --
>> Thomas Petazzoni, CTO, Free Electrons
>> Embedded Linux and Kernel engineering
>> http://free-electrons.com
>>
>
>
Thomas Petazzoni July 31, 2017, 7:22 p.m. UTC | #4
Hello,

On Mon, 31 Jul 2017 19:13:59 +0200, Petar Koretic wrote:

> diff --git a/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch b/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
> new file mode 100644
> index 0000000000..da68826ccb
> --- /dev/null
> +++ b/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
> @@ -0,0 +1,34 @@
> +From 03c2661b1243cc529fc3d8cfa65073f1da420307 Mon Sep 17 00:00:00 2001
> +From: Simon Hausmann <simon.hausmann@qt.io>
> +Date: Thu, 22 Jun 2017 13:34:09 +0200
> +Subject: [PATCH] Fix alignment issue on ARMv7
> +
> +As analyzed in the bug report, it appears that we may get
> +QV4::CompiledData::Function pointers for writing that are not aligned
> +for the 64-bit fields at the beginning.
> +
> +[ChangeLog][QtQml] Fix crash due to misaligned data structures on ARMv7
> +
> +Task-number: QTBUG-61552
> +Change-Id: I6b2c166b725496150c8850475577628ccd811d65
> +Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>

You should add your Signed-off-by here, and a link to the upstream bug
report or commit (I see you wrote the task number and change-id, but a
direct link is preferable).

Since anyway the patch was not entirely correct because it should be in
the 5.9.1/ subfolder, can you resend an updated version that takes into
account those small comments?

Thanks a lot!

Thomas
Petar Koretic July 31, 2017, 7:36 p.m. UTC | #5
Hi Thomas.

I've added Signed-off-by and a link to the upstream bug to my buildroot
patch that adds the patch from the Qt commit that is linked.
You want me to add Signed-off-by and qt bug report link to the Qt patch?
Because in the end I just took the patch from the Qt commit in 5.9 upstream
branch so I have no affiliation to that.

Thanks,
Petar

On Mon, Jul 31, 2017 at 9:22 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> On Mon, 31 Jul 2017 19:13:59 +0200, Petar Koretic wrote:
>
> > diff --git a/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
> b/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
> > new file mode 100644
> > index 0000000000..da68826ccb
> > --- /dev/null
> > +++ b/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
> > @@ -0,0 +1,34 @@
> > +From 03c2661b1243cc529fc3d8cfa65073f1da420307 Mon Sep 17 00:00:00 2001
> > +From: Simon Hausmann <simon.hausmann@qt.io>
> > +Date: Thu, 22 Jun 2017 13:34:09 +0200
> > +Subject: [PATCH] Fix alignment issue on ARMv7
> > +
> > +As analyzed in the bug report, it appears that we may get
> > +QV4::CompiledData::Function pointers for writing that are not aligned
> > +for the 64-bit fields at the beginning.
> > +
> > +[ChangeLog][QtQml] Fix crash due to misaligned data structures on ARMv7
> > +
> > +Task-number: QTBUG-61552
> > +Change-Id: I6b2c166b725496150c8850475577628ccd811d65
> > +Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
>
> You should add your Signed-off-by here, and a link to the upstream bug
> report or commit (I see you wrote the task number and change-id, but a
> direct link is preferable).
>
> Since anyway the patch was not entirely correct because it should be in
> the 5.9.1/ subfolder, can you resend an updated version that takes into
> account those small comments?
>
> Thanks a lot!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
>
Thomas Petazzoni July 31, 2017, 7:43 p.m. UTC | #6
Hello,

On Mon, 31 Jul 2017 21:36:35 +0200, Petar Koretic wrote:

> I've added Signed-off-by and a link to the upstream bug to my buildroot
> patch that adds the patch from the Qt commit that is linked.
> You want me to add Signed-off-by and qt bug report link to the Qt patch?

Yes, please.

> Because in the end I just took the patch from the Qt commit in 5.9 upstream
> branch so I have no affiliation to that.

Signed-off-by means that you are in the chain of people from the
original author of the patch to where the patch was being added, so it
makes sense to add your Signed-off-by in the Qt patch as well, since
you're pushing it to the Buildroot project.

Thanks!

Thomas
diff mbox

Patch

diff --git a/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch b/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
new file mode 100644
index 0000000000..da68826ccb
--- /dev/null
+++ b/package/qt5/qt5declarative/0003-Fix-alignment-issue-on-ARMv7.patch
@@ -0,0 +1,34 @@ 
+From 03c2661b1243cc529fc3d8cfa65073f1da420307 Mon Sep 17 00:00:00 2001
+From: Simon Hausmann <simon.hausmann@qt.io>
+Date: Thu, 22 Jun 2017 13:34:09 +0200
+Subject: [PATCH] Fix alignment issue on ARMv7
+
+As analyzed in the bug report, it appears that we may get
+QV4::CompiledData::Function pointers for writing that are not aligned
+for the 64-bit fields at the beginning.
+
+[ChangeLog][QtQml] Fix crash due to misaligned data structures on ARMv7
+
+Task-number: QTBUG-61552
+Change-Id: I6b2c166b725496150c8850475577628ccd811d65
+Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
+---
+ src/qml/compiler/qv4compiler.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp
+index e32749bbf..c32e1685a 100644
+--- a/src/qml/compiler/qv4compiler.cpp
++++ b/src/qml/compiler/qv4compiler.cpp
+@@ -406,6 +406,8 @@ QV4::CompiledData::Unit QV4::Compiler::JSUnitGenerator::generateHeader(QV4::Comp
+     *jsClassDataOffset = nextOffset;
+     nextOffset += jsClassData.size();
+ 
++    nextOffset = (nextOffset + 7) & ~quint32(0x7);
++
+     for (int i = 0; i < irModule->functions.size(); ++i) {
+         QV4::IR::Function *f = irModule->functions.at(i);
+         functionOffsets[i] = nextOffset;
+-- 
+2.13.3
+