[neon/qt/qt5webkit/Neon/release] debian: Fix segmentation fault on s390x (and potentially other 64-bit BE systems).

Dmitry Shachnev null at kde.org
Sat Apr 30 23:53:01 BST 2022


Git commit 4387b0f2e03925bb2f74090de6ef852fbcdf78d8 by Dmitry Shachnev.
Committed on 24/11/2021 at 18:42.
Pushed by sitter into branch 'Neon/release'.

Fix segmentation fault on s390x (and potentially other 64-bit BE systems).

Thanks Andreas Krebbel for the patch and Frank Heimes for the initial debdiff!

M  +5    -0    debian/changelog
A  +28   -0    debian/patches/jscore_big_endian.diff
M  +1    -0    debian/patches/series

https://invent.kde.org/neon/qt/qt5webkit/commit/4387b0f2e03925bb2f74090de6ef852fbcdf78d8

diff --git a/debian/changelog b/debian/changelog
index dcf61d2..55229db 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,10 @@
 qtwebkit-opensource-src (5.212.0~alpha4-14) UNRELEASED; urgency=medium
 
+  [ Dmitry Shachnev ]
+  * debian/patches/jscore_big_endian.diff: Fix segmentation fault on s390x
+    and potentially other 64-bit big endian systems (LP: #1951470).
+    Thanks Andreas Krebbel for the patch and Frank Heimes for the initial
+    debdiff!
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Wed, 24 Nov 2021 21:32:23 +0300
 
diff --git a/debian/patches/jscore_big_endian.diff b/debian/patches/jscore_big_endian.diff
new file mode 100644
index 0000000..802c00a
--- /dev/null
+++ b/debian/patches/jscore_big_endian.diff
@@ -0,0 +1,28 @@
+Description: fix JSCore segmentation fault on 64-bit big endian systems
+ In CodeBlock.cpp the code preparing the operands of op_get_from_scope writes
+ the property offset as pointer size (hence 64 bit) value:
+ .
+ 2141: instructions[i + 6].u.pointer = reinterpret_cast<void*>(op.operand);
+ .
+ while the same slot is accessed later by the jitted code as 32 bit integer:
+ .
+ macro getProperty(slow)
+    loadisFromInstruction(6, t1)
+ .
+ This fails on big endian targets since the integer access takes the higher
+ part of the 64 bit value.
+Origin: backport, https://github.com/webkit/webkit/commit/3fdde71c7d95d758
+Reviewed-by: Frank Heimes <frank.heimes at canonical.com>
+Last-Update: 2021-11-24
+
+--- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
++++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
+@@ -2020,7 +2020,7 @@ macro loadWithStructureCheck(operand, sl
+ end
+ 
+ macro getProperty(slow)
+-    loadisFromInstruction(6, t1)
++    loadpFromInstruction(6, t1)
+     loadPropertyAtVariableOffset(t1, t0, t2, slow)
+     valueProfile(t2, 7, t0)
+     loadisFromInstruction(1, t0)
diff --git a/debian/patches/series b/debian/patches/series
index a369709..f5c98e8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ bison_3.7.diff
 no_pdf_image_plugin.diff
 python_3.9.diff
 glib_2.68.diff
+jscore_big_endian.diff



More information about the Neon-commits mailing list