代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/firefox 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0b5da0bc80e4cfc1167d100f224ba577554909b0 Mon Sep 17 00:00:00 2001
From: caodongxia <315816521@qq.com>
Date: Wed, 11 Aug 2021 09:31:37 +0800
Subject: [PATCH] fix
---
js/xpconnect/src/XPCJSContext.cpp | 10 +---------
security/sandbox/linux/launch/SandboxLaunch.cpp | 11 ++++++++---
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp
index 54461fb88c..9a998ac88d 100644
--- a/js/xpconnect/src/XPCJSContext.cpp
+++ b/js/xpconnect/src/XPCJSContext.cpp
@@ -81,14 +81,6 @@ using namespace xpc;
using namespace JS;
using mozilla::dom::AutoEntryScript;
-// The watchdog thread loop is pretty trivial, and should not require much stack
-// space to do its job. So only give it 32KiB or the platform minimum.
-#if !defined(PTHREAD_STACK_MIN)
-# define PTHREAD_STACK_MIN 0
-#endif
-static constexpr size_t kWatchdogStackSize =
- PTHREAD_STACK_MIN < 32 * 1024 ? 32 * 1024 : PTHREAD_STACK_MIN;
-
static void WatchdogMain(void* arg);
class Watchdog;
class WatchdogManager;
@@ -161,7 +153,7 @@ class Watchdog {
// watchdog, we need to join it on shutdown.
mThread = PR_CreateThread(PR_USER_THREAD, WatchdogMain, this,
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
- PR_JOINABLE_THREAD, kWatchdogStackSize);
+ PR_JOINABLE_THREAD, 0);
if (!mThread) {
MOZ_CRASH("PR_CreateThread failed!");
}
diff --git a/security/sandbox/linux/launch/SandboxLaunch.cpp b/security/sandbox/linux/launch/SandboxLaunch.cpp
index 33d33a00c9..b70fa693d4 100644
--- a/security/sandbox/linux/launch/SandboxLaunch.cpp
+++ b/security/sandbox/linux/launch/SandboxLaunch.cpp
@@ -489,7 +489,7 @@ static int CloneCallee(void* aPtr) {
// we don't currently support sandboxing under valgrind.
MOZ_NEVER_INLINE MOZ_ASAN_BLACKLIST static pid_t DoClone(int aFlags,
jmp_buf* aCtx) {
- uint8_t miniStack[PTHREAD_STACK_MIN];
+ uint8_t miniStack[4096];
#ifdef __hppa__
void* stackPtr = miniStack;
#else
@@ -509,14 +509,19 @@ static pid_t ForkWithFlags(int aFlags) {
CLONE_PARENT_SETTID | CLONE_CHILD_SETTID |
CLONE_CHILD_CLEARTID;
MOZ_RELEASE_ASSERT((aFlags & kBadFlags) == 0);
+ // Block signals due to small stack in DoClone
+ sigset_t oldSigs;
+ BlockAllSignals(&oldSigs);
+ int ret = 0;
jmp_buf ctx;
if (setjmp(ctx) == 0) {
// In the parent and just called setjmp:
- return DoClone(aFlags | SIGCHLD, &ctx);
+ ret = DoClone(aFlags | SIGCHLD, &ctx);
}
+ RestoreSignals(&oldSigs);
// In the child and have longjmp'ed:
- return 0;
+ return ret;
}
static bool WriteStringToFile(const char* aPath, const char* aStr,
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。