webkit2gtk: update to 2.30.5

This commit is contained in:
q66 2021-02-16 20:11:30 +01:00
parent 4d33558cf0
commit fd1e2a43b4
3 changed files with 26 additions and 67 deletions

View file

@ -1,45 +1,22 @@
From a558bfcedf9d87d12f158a6917383d228da7ca75 Mon Sep 17 00:00:00 2001 https://bugs.webkit.org/show_bug.cgi?id=221709
From: q66 <daniel@octaforge.org>
Date: Mon, 4 Jan 2021 17:17:28 +0100
Subject: [PATCH] fix bubblewrap libdir mounts for 32-bit systems
an upstream fix should be better than this, but this is good diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
enough for void, since we strictly build with gcc anyway. and index 69b4dc6a6a0b..dc660f399257 100644
having a small patch is more important than portable patch
---
.../UIProcess/Launcher/glib/BubblewrapLauncher.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
index 889388a..a7a75a8 100644
--- Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp --- Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+++ Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp +++ Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
@@ -733,6 +733,12 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces @@ -758,9 +758,15 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces
if (launchOptions.processType == ProcessLauncher::ProcessType::Network)
return adoptGRef(g_subprocess_launcher_spawnv(launcher, argv, error));
+#if __UINTPTR_MAX__ > 0xFFFFFFFF
+# define LIB_DIR_WS "64"
+#else
+# define LIB_DIR_WS "32"
+#endif
+
Vector<CString> sandboxArgs = {
"--die-with-parent",
"--unshare-pid",
@@ -765,9 +771,9 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces
"--ro-bind-try", "/usr/lib", "/usr/lib", "--ro-bind-try", "/usr/lib", "/usr/lib",
"--ro-bind-try", "/usr/local/lib", "/usr/local/lib", "--ro-bind-try", "/usr/local/lib", "/usr/local/lib",
"--ro-bind-try", LIBDIR, LIBDIR, "--ro-bind-try", LIBDIR, LIBDIR,
- "--ro-bind-try", "/lib64", "/lib64", +#if CPU(ADDRESS64)
- "--ro-bind-try", "/usr/lib64", "/usr/lib64", "--ro-bind-try", "/lib64", "/lib64",
- "--ro-bind-try", "/usr/local/lib64", "/usr/local/lib64", "--ro-bind-try", "/usr/lib64", "/usr/lib64",
+ "--ro-bind-try", "/lib" LIB_DIR_WS, "/lib" LIB_DIR_WS, "--ro-bind-try", "/usr/local/lib64", "/usr/local/lib64",
+ "--ro-bind-try", "/usr/lib" LIB_DIR_WS, "/usr/lib" LIB_DIR_WS, +#else
+ "--ro-bind-try", "/usr/local/lib" LIB_DIR_WS, "/usr/local/lib" LIB_DIR_WS, + "--ro-bind-try", "/lib32", "/lib32",
+ "--ro-bind-try", "/usr/lib32", "/usr/lib32",
+ "--ro-bind-try", "/usr/local/lib32", "/usr/local/lib32",
+#endif
"--ro-bind-try", PKGLIBEXECDIR, PKGLIBEXECDIR, "--ro-bind-try", PKGLIBEXECDIR, PKGLIBEXECDIR,
}; };
--
2.30.0

View file

@ -1,58 +1,40 @@
This fixes JavaScriptCore on 32-bit big endian systems (mainly ppc). https://bugs.webkit.org/show_bug.cgi?id=221710
Without the patch, attempting to run any JS results in a crash.
Upstream status: https://bugs.webkit.org/show_bug.cgi?id=211592
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
index 66571beb5c60..e273c6dd28a8 100644
--- Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm --- Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
+++ Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm +++ Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
@@ -1480,13 +1480,21 @@ llintOpWithMetadata(op_put_by_id, OpPutById, macro (size, get, dispatch, metadat @@ -1579,13 +1579,13 @@ llintOpWithMetadata(op_put_by_id, OpPutById, macro (size, get, dispatch, metadat
loadp StructureChain::m_vector[t3], t3 loadp StructureChain::m_vector[t3], t3
assert(macro (ok) btpnz t3, ok end) assert(macro (ok) btpnz t3, ok end)
- loadp Structure::m_prototype[t2], t2 - loadp Structure::m_prototype[t2], t2
+ if JSVALUE64 + loadp Structure::m_prototype + PayloadOffset[t2], t2
+ loadp Structure::m_prototype[t2], t2
+ else
+ loadp Structure::m_prototype + PayloadOffset[t2], t2
+ end
btpz t2, .opPutByIdTransitionChainDone btpz t2, .opPutByIdTransitionChainDone
.opPutByIdTransitionChainLoop: .opPutByIdTransitionChainLoop:
loadp [t3], t1 loadp [t3], t1
bineq t1, JSCell::m_structureID[t2], .opPutByIdSlow bineq t1, JSCell::m_structureID[t2], .opPutByIdSlow
addp 4, t3 addp 4, t3
- loadp Structure::m_prototype[t1], t2 - loadp Structure::m_prototype[t1], t2
+ if JSVALUE64 + loadp Structure::m_prototype + PayloadOffset[t1], t2
+ loadp Structure::m_prototype[t1], t2
+ else
+ loadp Structure::m_prototype + PayloadOffset[t1], t2
+ end
btpnz t2, .opPutByIdTransitionChainLoop btpnz t2, .opPutByIdTransitionChainLoop
.opPutByIdTransitionChainDone: .opPutByIdTransitionChainDone:
@@ -2068,7 +2076,11 @@ end) @@ -2251,7 +2251,7 @@ end)
op(llint_throw_from_slow_path_trampoline, macro() op(llint_throw_from_slow_path_trampoline, macro()
- loadp Callee[cfr], t1 - loadp Callee[cfr], t1
+ if JSVALUE64 + loadp Callee + PayloadOffset[cfr], t1
+ loadp Callee[cfr], t1
+ else
+ loadp Callee + PayloadOffset[cfr], t1
+ end
convertCalleeToVM(t1) convertCalleeToVM(t1)
copyCalleeSavesToVMEntryFrameCalleeSavesBuffer(t1, t2) copyCalleeSavesToVMEntryFrameCalleeSavesBuffer(t1, t2)
@@ -2077,7 +2089,11 @@ op(llint_throw_from_slow_path_trampoline, macro() @@ -2260,7 +2260,7 @@ op(llint_throw_from_slow_path_trampoline, macro()
# When throwing from the interpreter (i.e. throwing from LLIntSlowPaths), so # When throwing from the interpreter (i.e. throwing from LLIntSlowPaths), so
# the throw target is not necessarily interpreted code, we come to here. # the throw target is not necessarily interpreted code, we come to here.
# This essentially emulates the JIT's throwing protocol. # This essentially emulates the JIT's throwing protocol.
- loadp Callee[cfr], t1 - loadp Callee[cfr], t1
+ if JSVALUE64 + loadp Callee + PayloadOffset[cfr], t1
+ loadp Callee[cfr], t1
+ else
+ loadp Callee + PayloadOffset[cfr], t1
+ end
convertCalleeToVM(t1) convertCalleeToVM(t1)
jmp VM::targetMachinePCForThrow[t1] jmp VM::targetMachinePCForThrow[t1]
end) end)

View file

@ -1,8 +1,8 @@
# Template file for 'webkit2gtk' # Template file for 'webkit2gtk'
# ping q66 before touching this # ping q66 before touching this
pkgname=webkit2gtk pkgname=webkit2gtk
version=2.30.4 version=2.30.5
revision=5 revision=1
wrksrc="webkitgtk-${version}" wrksrc="webkitgtk-${version}"
build_style=cmake build_style=cmake
build_helper="gir" build_helper="gir"
@ -42,7 +42,7 @@ maintainer="q66 <daniel@octaforge.org>"
license="LGPL-2.1-or-later, BSD-2-Clause" license="LGPL-2.1-or-later, BSD-2-Clause"
homepage="https://webkitgtk.org/" homepage="https://webkitgtk.org/"
distfiles="${homepage}/releases/webkitgtk-${version}.tar.xz" distfiles="${homepage}/releases/webkitgtk-${version}.tar.xz"
checksum=d595a37c5001ff787266b155e303a5f2e5b48a6d466f2714c2f30c11392f7b24 checksum=7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f
build_options="gir wayland x11 bubblewrap jit sampling_profiler minibrowser" build_options="gir wayland x11 bubblewrap jit sampling_profiler minibrowser"
build_options_default="gir wayland x11 bubblewrap minibrowser" build_options_default="gir wayland x11 bubblewrap minibrowser"