6901976
diff -ur firefox-90.0.orig/js/xpconnect/src/XPCJSContext.cpp firefox-90.0/js/xpconnect/src/XPCJSContext.cpp
6901976
--- firefox-90.0.orig/js/xpconnect/src/XPCJSContext.cpp	2021-07-05 21:16:02.000000000 +0200
6901976
+++ firefox-90.0/js/xpconnect/src/XPCJSContext.cpp	2021-07-19 15:01:24.083460460 +0200
6901976
@@ -85,14 +85,6 @@
6901976
 using namespace xpc;
6901976
 using namespace JS;
6901976
 
6901976
-// The watchdog thread loop is pretty trivial, and should not require much stack
6901976
-// space to do its job. So only give it 32KiB or the platform minimum.
6901976
-#if !defined(PTHREAD_STACK_MIN)
6901976
-#  define PTHREAD_STACK_MIN 0
6901976
-#endif
6901976
-static constexpr size_t kWatchdogStackSize =
6901976
-    PTHREAD_STACK_MIN < 32 * 1024 ? 32 * 1024 : PTHREAD_STACK_MIN;
6901976
-
6901976
 static void WatchdogMain(void* arg);
6901976
 class Watchdog;
6901976
 class WatchdogManager;
6901976
@@ -163,7 +155,7 @@
6901976
       // watchdog, we need to join it on shutdown.
6901976
       mThread = PR_CreateThread(PR_USER_THREAD, WatchdogMain, this,
6901976
                                 PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
6901976
-                                PR_JOINABLE_THREAD, kWatchdogStackSize);
6901976
+                                PR_JOINABLE_THREAD, 0);
6901976
       if (!mThread) {
6901976
         MOZ_CRASH("PR_CreateThread failed!");
6901976
       }
6901976
Only in firefox-90.0/js/xpconnect/src: XPCJSContext.cpp.firefox-glibc-dynstack
6901976
diff -ur firefox-90.0.orig/security/sandbox/linux/launch/SandboxLaunch.cpp firefox-90.0/security/sandbox/linux/launch/SandboxLaunch.cpp
6901976
--- firefox-90.0.orig/security/sandbox/linux/launch/SandboxLaunch.cpp	2021-07-05 18:20:36.000000000 +0200
6901976
+++ firefox-90.0/security/sandbox/linux/launch/SandboxLaunch.cpp	2021-07-20 08:39:17.272136982 +0200
6901976
@@ -501,8 +501,7 @@
6901976
 MOZ_NEVER_INLINE MOZ_ASAN_BLACKLIST static pid_t DoClone(int aFlags,
6901976
                                                          jmp_buf* aCtx) {
6901976
   static constexpr size_t kStackAlignment = 16;
6901976
-  uint8_t miniStack[PTHREAD_STACK_MIN]
6901976
-      __attribute__((aligned(kStackAlignment)));
6901976
+  uint8_t miniStack[4096] __attribute__((aligned(kStackAlignment)));
6901976
 #ifdef __hppa__
6901976
   void* stackPtr = miniStack;
6901976
 #else
6901976
@@ -523,13 +522,19 @@
6901976
                                CLONE_CHILD_CLEARTID;
6901976
   MOZ_RELEASE_ASSERT((aFlags & kBadFlags) == 0);
6901976
 
6901976
+  // Block signals due to small stack in DoClone.
6901976
+  sigset_t oldSigs;
6901976
+  BlockAllSignals(&oldSigs);
6901976
+
6901976
+  int ret = 0;
6901976
   jmp_buf ctx;
6901976
   if (setjmp(ctx) == 0) {
6901976
     // In the parent and just called setjmp:
6901976
-    return DoClone(aFlags | SIGCHLD, &ctx;;
6901976
+    ret = DoClone(aFlags | SIGCHLD, &ctx;;
6901976
   }
6901976
+  RestoreSignals(&oldSigs);
6901976
   // In the child and have longjmp'ed:
6901976
-  return 0;
6901976
+  return ret;
6901976
 }
6901976
 
6901976
 static bool WriteStringToFile(const char* aPath, const char* aStr,
6901976
Only in firefox-90.0/security/sandbox/linux/launch: SandboxLaunch.cpp~