[gnome-build-meta/mcatanzaro/webkit2gtk-4.1: 4/4] webkitgtk.bst: disable bmalloc during build




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

    webkitgtk.bst: disable bmalloc 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 causes all of WebKit's heap security features. So that would be
    a 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.

 elements/sdk/webkitgtk.bst | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/elements/sdk/webkitgtk.bst b/elements/sdk/webkitgtk.bst
index eaef6b55..ecf8dddf 100644
--- a/elements/sdk/webkitgtk.bst
+++ b/elements/sdk/webkitgtk.bst
@@ -61,6 +61,9 @@ variables:
     environment:
       CFLAGS: '%{flags_arm} -g1'
       CXXFLAGS: '%{flags_arm} -g1'
+- arch == "aarch64":
+    environment:
+      Malloc: '1'
 
 public:
   cpe:


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