From 528e3071e9ce955ce21e8c6f4e0553f2ad14f03e Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Tue, 10 Jan 2017 13:35:38 +0000
Subject: [PATCH] Issue #2828559 by tacituseu, alexpott, mpdonadio, amateescu,
 hchonov, catch, xjm, Wim Leers, Mixologic: UpdatePathTestBase tests randomly
 failing

---
 update.php | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/update.php b/update.php
index 42adef25d67d..59e808ed24c5 100644
--- a/update.php
+++ b/update.php
@@ -13,6 +13,15 @@
 
 $autoloader = require_once 'autoload.php';
 
+// Disable garbage collection during test runs. Under certain circumstances the
+// update path will create so many objects that garbage collection causes
+// segmentation faults.
+require_once 'core/includes/bootstrap.inc';
+if (drupal_valid_test_ua()) {
+  gc_collect_cycles();
+  gc_disable();
+}
+
 $kernel = new UpdateKernel('prod', $autoloader, FALSE);
 $request = Request::createFromGlobals();
 
-- 
GitLab