Skip to contentSkip to conversation

qtscript/qtwebkit: disable thumb for armv4 and armv5 only to fix segfault on armv7

PATCH In review Andreas Müller 2 participants 2 messages Jan 4, 2016 – Jan 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qtscript/qtwebkit: disable thumb for armv4 and armv5 only to fix segfault on armv7

We have a simple application containing a QWebView which segfaulted during loading a page on a CortexA9 (armv7 thumb2). After enabling debug information for qtwebkit and remote debug session the point of segfault was detected in

Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1082
callSlowPath(_llint_slow_path_new_func_exp)

Further digging around lead to similar source in:

* qtwebkit: Source/JavaScriptCore/assembler/ARMv7Assembler.h
* qtscript: src/3rdparty/javascriptcore/JavaScriptCore/assembler/ARMv7Assembler.h

In these files a class ARMThumbImmediate is declared and used in many places. This lead me to the suspicion that compiligng for armv7 expects thumb support.

The following tests were performed:

* our application is working fine again
* qtscript and qtwebkit were build with
'ARM_INSTRUCTION_SET = "thumb"' => TUNE_FEATURES = "arm armv5 thumb dsp" for qemuarm without issues

This is a partial/rebased revert of:
commit 932b32c1c9e9a3ac833c82ff9273683345056ec7

Author: Martin Jansa <[email protected]>
Date:   Wed Apr 22 15:33:01 2015 +0200

qtscript,qtwebking: disable thumb

* qemuarm builds fail when thumb is enabled

---
 recipes-qt/qt5/qtscript_git.bb | 3 ++-
 recipes-qt/qt5/qtwebkit_git.bb | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
recipes-qt/qt5/qtscript_git.bb +2 -1
index c6dca51..c53217a 100644
@@ -22,7 +22,8 @@ LIC_FILES_CHKSUM = " \
 #{standard input}:23: Error: selected processor does not support Thumb mode `stmdb sp!,{r4-r8,lr}'
 #{standard input}:30: Error: lo register required -- `ldmia sp!,{r4-r8,lr}'
 #{standard input}:43: Error: lo register required -- `ldmia sp!,{r4-r8,lr}'
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
 
 DEPENDS += "qtbase"
 
recipes-qt/qt5/qtwebkit_git.bb +2 -1
index 862abd2..a952306 100644
@@ -15,7 +15,8 @@ DEPENDS += "qtbase qtdeclarative icu ruby-native sqlite3 glib-2.0 libxslt"
 # | {standard input}: Assembler messages:
 # | {standard input}:106: Error: invalid immediate: 983040 is out of range
 # | {standard input}:106: Error: value of 983040 too large for field of 2 bytes at 146
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
 
 SRC_URI += "\
     file://0001-qtwebkit-fix-QA-issue-bad-RPATH.patch \
Signature · 1 line
2.5.0
#1 lore raw
Quoted 9 lines · Andreas Müller

We have a simple application containing a QWebView which segfaulted during loading a page on a CortexA9 (armv7 thumb2). After enabling debug information for qtwebkit and remote debug session the point of segfault was detected in

Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1082
callSlowPath(_llint_slow_path_new_func_exp)

yes llint has issues with arm mode on armv7

Quoted 69 lines

Further digging around lead to similar source in:

* qtwebkit: Source/JavaScriptCore/assembler/ARMv7Assembler.h
* qtscript: src/3rdparty/javascriptcore/JavaScriptCore/assembler/ARMv7Assembler.h

In these files a class ARMThumbImmediate is declared and used in many places. This lead me to the suspicion that compiligng for armv7 expects thumb support.

The following tests were performed:

* our application is working fine again
* qtscript and qtwebkit were build with
'ARM_INSTRUCTION_SET = "thumb"' => TUNE_FEATURES = "arm armv5 thumb dsp" for qemuarm without issues

This is a partial/rebased revert of:
commit 932b32c1c9e9a3ac833c82ff9273683345056ec7

Author: Martin Jansa <[email protected]>
Date:   Wed Apr 22 15:33:01 2015 +0200

qtscript,qtwebking: disable thumb

* qemuarm builds fail when thumb is enabled

---
recipes-qt/qt5/qtscript_git.bb | 3 ++-
recipes-qt/qt5/qtwebkit_git.bb | 3 ++-

2 files changed, 4 insertions(+), 2 deletions(-)
recipes-qt/qt5/qtscript_git.bb +2 -1
index c6dca51..c53217a 100644
@@ -22,7 +22,8 @@ LIC_FILES_CHKSUM = " \
 #{standard input}:23: Error: selected processor does not support Thumb mode `stmdb sp!,{r4-r8,lr}'
 #{standard input}:30: Error: lo register required -- `ldmia sp!,{r4-r8,lr}'
 #{standard input}:43: Error: lo register required -- `ldmia sp!,{r4-r8,lr}'
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
 

DEPENDS += "qtbase"

recipes-qt/qt5/qtwebkit_git.bb +2 -2
index 862abd2..a952306 100644
@@ -15,7 +15,8 @@ DEPENDS += "qtbase qtdeclarative icu ruby-native sqlite3 glib-2.0 libxslt"
 # | {standard input}: Assembler messages:
 # | {standard input}:106: Error: invalid immediate: 983040 is out of range
 # | {standard input}:106: Error: value of 983040 too large for field of 2 bytes at 146
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
 
 SRC_URI += "\
    file://0001-qtwebkit-fix-QA-issue-bad-RPATH.patch \
--

2.5.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel