Skip to content

Commit 7fb702b

Browse files
committed
morello-webkit: Set +nocherirevoke on installed JSC binary
MRS breaks the continuous arena implementation. Ideally the continuous arena would be written to not rely on jemalloc-specific APIs, but that's not happening any time soon, and it would be good to get the WebKit tests passing reliably in Arm's Morello CI so we can catch any regressions. This still isn't quite right, (s)dallocx currently don't honour the flags even when not quarantining, so MALLOCX_TCACHE_NONE will do nothing, but presumably the result of that is at worst memory being leaked (due to mallocx with MALLOCX_TCACHE_NONE never using it) or some other part of JSC allocating that memory instead, so hopefully things still work.
1 parent a83e94e commit 7fb702b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

pycheribuild/projects/cross/webkit.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
from enum import Enum
3232

33+
from .cheribsd import BuildFreeBSD
3334
from .crosscompileproject import CrossCompileCMakeProject, DefaultInstallDir, GitRepository
3435
from ..simple_project import BoolConfigOption
3536

@@ -157,6 +158,22 @@ def setup(self):
157158
else:
158159
self.add_cmake_options(ENABLE_JIT_ARM64_EMBED_POINTERS_AS_ALIGNED_LITERALS=self.tier2ptrliterals)
159160

161+
def install(self, **kwargs):
162+
# XXX: Work around MRS breaking continuous arena (uses non-portable
163+
# APIs to allocate from the arena, which MRS ignores).
164+
if self.crosscompile_target.is_cheri_purecap():
165+
if self.compiling_for_host():
166+
elfctl_root = "/"
167+
else:
168+
freebsd_builddir = self.target_info.get_rootfs_project(t=BuildFreeBSD, caller=self).objdir
169+
elfctl_root = freebsd_builddir / "tmp"
170+
elfctl_cmd = elfctl_root / "usr/bin/elfctl"
171+
172+
super().install(**kwargs)
173+
174+
if self.crosscompile_target.is_cheri_purecap():
175+
self.run_cmd([elfctl_cmd, "-e", "+nocherirevoke", self.install_dir / "bin/jsc"])
176+
160177
def run_tests(self):
161178
if self.compiling_for_host():
162179
self.fatal("Running host tests not implemented")

0 commit comments

Comments
 (0)