Bug 1512162 - Disable stack protection for a portion of XPConnect on ppc64le due to a compiler bug. r=bholley, a=RyanVM
authorCameron Kaiser <spectre@floodgap.com>
Wed, 12 Dec 2018 18:52:08 -0800
changeset 506232 e1ec36f44f7309e240c3688e4f60665385789fb5
parent 506231 17686e2a8e1057e9a968df2398d8789808556430
child 506233 bc01e30511057c6b9b3c7c728675c016806d67b5
push id10340
push userryanvm@gmail.com
push dateSat, 15 Dec 2018 19:26:47 +0000
treeherdermozilla-beta@7cc9c0386e87 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley, RyanVM
bugs1512162
milestone65.0
Bug 1512162 - Disable stack protection for a portion of XPConnect on ppc64le due to a compiler bug. r=bholley, a=RyanVM
js/xpconnect/src/XPCWrappedNative.cpp
--- a/js/xpconnect/src/XPCWrappedNative.cpp
+++ b/js/xpconnect/src/XPCWrappedNative.cpp
@@ -1,16 +1,22 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
 /* Wrapper object for reflecting native xpcom objects into JavaScript. */
 
+#if(__GNUC__ && __linux__ && __PPC64__ && _LITTLE_ENDIAN)
+// Stack protection generates incorrect code currently with gcc on ppc64le
+// (bug 1512162).
+#pragma GCC optimize("no-stack-protector")
+#endif
+
 #include "xpcprivate.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "nsWrapperCacheInlines.h"
 #include "XPCLog.h"
 #include "js/MemoryFunctions.h"
 #include "js/Printf.h"
 #include "jsfriendapi.h"
 #include "AccessCheck.h"