Fix the build with newer glibc
Resolves: rhbz#1984794 Also update sources as I used rhpkg instread of centpkg previously
This commit is contained in:
parent
b9317f90fc
commit
2cbbdbeda7
62
firefox-glibc-dynstack.patch
Normal file
62
firefox-glibc-dynstack.patch
Normal file
@ -0,0 +1,62 @@
|
||||
diff -up firefox-78.12.0/js/xpconnect/src/XPCJSContext.cpp.firefox-glibc-dynstack firefox-78.12.0/js/xpconnect/src/XPCJSContext.cpp
|
||||
--- firefox-78.12.0/js/xpconnect/src/XPCJSContext.cpp.firefox-glibc-dynstack 2021-07-06 21:50:42.000000000 +0200
|
||||
+++ firefox-78.12.0/js/xpconnect/src/XPCJSContext.cpp 2021-08-02 10:26:47.996760110 +0200
|
||||
@@ -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 -up firefox-78.12.0/security/sandbox/linux/launch/SandboxLaunch.cpp.firefox-glibc-dynstack firefox-78.12.0/security/sandbox/linux/launch/SandboxLaunch.cpp
|
||||
--- firefox-78.12.0/security/sandbox/linux/launch/SandboxLaunch.cpp.firefox-glibc-dynstack 2021-07-06 21:50:46.000000000 +0200
|
||||
+++ firefox-78.12.0/security/sandbox/linux/launch/SandboxLaunch.cpp 2021-08-02 10:28:48.832946590 +0200
|
||||
@@ -489,7 +489,8 @@ 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];
|
||||
+ static constexpr size_t kStackAlignment = 16;
|
||||
+ uint8_t miniStack[4096] __attribute__((aligned(kStackAlignment)));
|
||||
#ifdef __hppa__
|
||||
void* stackPtr = miniStack;
|
||||
#else
|
||||
@@ -510,13 +511,19 @@ static pid_t ForkWithFlags(int aFlags) {
|
||||
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
sources
2
sources
@ -9,4 +9,4 @@ SHA512 (cbindgen-vendor-0.14.3.tar.xz) = 33c8d28547674121f690eea0d3ebac33926a39c
|
||||
SHA512 (nss-3.53.1-3.fc32.src.rpm) = 368849487aa8f9d602c9e5d9d7c88ebd03318aece12470283ff31744ef9eed27ef1e32031378a5a673bb06a9ebbcf5542afa13f3ad465409449c218922189acb
|
||||
SHA512 (nodejs-10.21.0-5.fc32.src.rpm) = 4d0c212a2609dc10e242a96f63baa8babb91e8aa6696f66f627c562c1ba30cb3632ed01991c98f48b5942fc7fd89ee34b350f41de901339b49a2c19e979593a7
|
||||
SHA512 (thunderbird-langpacks-78.12.0-20210712.tar.xz) = ea243e0c7dbbd2d81675a106b86d02e55914a67ef56696d43ea5a4f211fdfccbc3e52638c0a8bdb264b7005d4432c475b6b5e7610c614cbf1da3e1e6e1f0d462
|
||||
SHA512 (thunderbird-78.12.0.processed-source.tar.xz) = b14ce7b967be0492bb84b707e86c6718c63b8f60a922e942d603677863c98a2c65934f147bc58b545ac59248a9c99cd004303b271e150a58dd53cb8f4b92ad55
|
||||
SHA512 (thunderbird-78.12.0.processed-source.tar.xz) = a0d345c863e26049c13b702bb0ed6eb00b3ee822012f81d8ad6476f3708d505b9a88102c7d85276383ac1fefb005f03ef5df21964cfc7b22e43b8e7777740c2d
|
||||
|
@ -252,6 +252,7 @@ Patch234: rhbz-1821418.patch
|
||||
Patch235: firefox-pipewire-0-3.patch
|
||||
Patch236: fedora-shebang-build.patch
|
||||
Patch237: disable-openpgp-in-thunderbird.patch
|
||||
Patch238: firefox-glibc-dynstack.patch
|
||||
|
||||
# Upstream patches
|
||||
Patch402: mozilla-1196777.patch
|
||||
@ -543,6 +544,7 @@ echo "use_bundled_yasm %{?use_bundled_yasm}"
|
||||
|
||||
%patch236 -p1 -b .fedora-shebang-build
|
||||
%patch237 -p1 -b .disable-openpgp-in-thunderbird
|
||||
%patch238 -p1 -b .firefox-glibc-dynstack
|
||||
|
||||
%patch234 -p1 -b .rhbz-1821418
|
||||
|
||||
@ -1317,6 +1319,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%changelog
|
||||
* Fri Jul 30 2021 Tomas Popela <tpopela@redhat.com> - 78.12.0-3
|
||||
- Add script to process the official tarball to comply with PELC review
|
||||
- Fix the build with newer glibc
|
||||
|
||||
* Mon Jul 12 2021 Eike Rathke <erack@redhat.com> - 78.12.0-2
|
||||
- Update to 78.12.0 build2
|
||||
|
Loading…
Reference in New Issue
Block a user