Bug 1576303 - Temporary compiler workaround for crashes on ppc64le. r=tcampbell
authorCameron Kaiser <spectre@floodgap.com>
Fri, 30 Aug 2019 02:28:39 +0000
changeset 551314 4559e60f4ddebbe462b4aa5569849a404b29cafa
parent 551313 9424c2a92af4b3838f0d8d352042018b890a9f65
child 551315 ce8d92d5a45b48b2d191503dcc73dc844bd6986a
push id11865
push userbtara@mozilla.com
push dateMon, 02 Sep 2019 08:54:37 +0000
treeherdermozilla-beta@37f59c4671b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1576303
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1576303 - Temporary compiler workaround for crashes on ppc64le. r=tcampbell Differential Revision: https://phabricator.services.mozilla.com/D43715
js/src/gc/Barrier.h
--- a/js/src/gc/Barrier.h
+++ b/js/src/gc/Barrier.h
@@ -2,16 +2,24 @@
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef gc_Barrier_h
 #define gc_Barrier_h
 
+#if (__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN)
+// Work around a possible compiler bug on ppc64le (bug 1576303).
+// This file and anything downstream of it should not have functions
+// inlined on that architecture due to crashes.
+#pragma GCC push_options
+#pragma GCC optimize ("no-inline-functions")
+#endif
+
 #include "NamespaceImports.h"
 
 #include "gc/Cell.h"
 #include "gc/StoreBuffer.h"
 #include "js/HeapAPI.h"
 #include "js/Id.h"
 #include "js/RootingAPI.h"
 #include "js/Value.h"
@@ -1083,9 +1091,13 @@ template <>
 struct DefineComparisonOps<HeapSlot> : mozilla::TrueType {
   static const Value& get(const HeapSlot& v) { return v.get(); }
 };
 
 } /* namespace detail */
 
 } /* namespace js */
 
+#if (__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN)
+#pragma GCC pop_options
+#endif
+
 #endif /* gc_Barrier_h */