[gnome-build-meta/jjardon/fdsdk-20.08.14: 1/2] project.conf: disable bmalloc and JIT during build




commit 0862ab2e5d4415c1368cdcb8c7d4a8e1471db007
Author: Michael Catanzaro <mcatanzaro redhat com>
Date:   Fri Jun 18 10:21:49 2021 -0500

    project.conf: disable bmalloc and JIT during build
    
    We recently upgraded our aarch64 CI runner, and now it is running
    CentOS. This is a problem because RHEL and CentOS on aarch64 use a 64 KB
    page size, unlike all other distros, which use 4 KB. The mismatch in
    expected page size between the container and the host is causing
    problems for gobject-introspection. gi-scanner runs during the build and
    calls every get_type() function, which winds up initializing WebKit and
    bmalloc. But bmalloc requires the system page size is 16 KB or less.
    
    The normal solution for this is to use the -DUSE_64KB_PAGE_BLOCK=ON
    option, which exists specifically to make WebKit not crash on aarch64
    CentOS and RHEL. It shouldn't be used elsewhere because (a) 64 KB page
    blocks are 16x bigger than the usual 4 KB page blocks, which is bad for
    performance and memory usage on embedded devices, and (b) disabling
    bmalloc disables all of WebKit's heap security features. So we only want
    to do that as an absolute last resort.
    
    Fortunately, we only need to disable bmalloc during the build itself.
    The WebKitGTK that we've built will work just fine as long as it's not
    itself run on CentOS or RHEL.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1170>

 project.conf | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/project.conf b/project.conf
index a0d0ef60..8d5eb801 100644
--- a/project.conf
+++ b/project.conf
@@ -100,6 +100,16 @@ environment:
       CFLAGS: "%{flags_aarch64}"
       CXXFLAGS: "%{flags_aarch64}"
       LDFLAGS: "%{ldflags_defaults}"
+      # Our aarch64 CI runner uses CentOS, which uses 64 KB page sizes, but we do not
+      # want to support large pages in WebKit as this requires disabling both JIT and
+      # bmalloc, including all heap security features. As a workaround until the CI
+      # runner is switched from CentOS to a more-compatible OS, we can disable these
+      # features only during the build process, so that gobject-introspection does not
+      # crash during the build. This workaround is required in project.conf because
+      # it's needed for every element that depends on WebKit, which is a lot. Remove
+      # when the aarch64 CI no longer uses CentOS.
+      JavaScriptCoreUseJIT: '0'
+      Malloc: '1'
   - arch == "ppc64le":
       CFLAGS: "%{flags_ppc64le}"
       CXXFLAGS: "%{flags_ppc64le}"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]