# HG changeset patch # User Wolfgang Rosenauer # Date 1505635584 -7200 # Node ID c360e9aac24a4f4e5a9105787a424b09257385c5 # Parent 038d048a39402aad72e4423c402a839d7ecce221# Parent b2ba34e0dc10879e2f209ddb483447a88c45d5dd merge updates from firefox55 diff -r 038d048a3940 -r c360e9aac24a MozillaFirefox/MozillaFirefox.changes --- a/MozillaFirefox/MozillaFirefox.changes Sat Aug 05 20:31:55 2017 +0200 +++ b/MozillaFirefox/MozillaFirefox.changes Sun Sep 17 10:06:24 2017 +0200 @@ -1,7 +1,27 @@ ------------------------------------------------------------------- +Mon Sep 4 18:27:44 UTC 2017 - wr@rosenauer.org + +- update to Firefox 55.0.3 + * Fix an issue with addons when using a path containing non-ascii + characters (bmo#1389160) + * Fix file uploads to some websites, including YouTube (bmo#1383518) +- fix Google API key build integration +- add mozilla-ucontext.patch to fix Tumbleweed build +- do not enable XINPUT2 for now (boo#1053959) + +------------------------------------------------------------------- +Fri Aug 11 08:32:30 UTC 2017 - wr@rosenauer.org + +- update to Firefox 55.0.1 + * Fix a regression the tab restoration process (bmo#1388160) + * Fix a problem causing What's new pages not to be displayed (bmo#1386224) + * Fix a rendering issue with some PKCS#11 libraries (bmo#1388370) + * Disable the predictor prefetch (bmo#1388160) + +------------------------------------------------------------------- Sat Aug 5 13:22:16 UTC 2017 - wr@rosenauer.org -- update to Firefox 55.0b13 +- update to Firefox 55.0 (boo#1052829) * Browsing sessions with a high number of tabs are now restored in an instant * Sidebar (bookmarks, history, synced tabs) can now be moved to @@ -32,6 +52,65 @@ * Insecure sites can no longer access the Geolocation APIs to get access to your physical location * requires NSPR 4.15 and NSS 3.31 + MFSA 2017-18 + * CVE-2017-7798 (bmo#1371586, bmo#1372112) + XUL injection in the style editor in devtools + * CVE-2017-7800 (bmo#1374047) + Use-after-free in WebSockets during disconnection + * CVE-2017-7801 (bmo#1371259) + Use-after-free with marquee during window resizing + * CVE-2017-7809 (bmo#1380284) + Use-after-free while deleting attached editor DOM node + * CVE-2017-7784 (bmo#1376087) + Use-after-free with image observers + * CVE-2017-7802 (bmo#1378147) + Use-after-free resizing image elements + * CVE-2017-7785 (bmo#1356985) + Buffer overflow manipulating ARIA attributes in DOM + * CVE-2017-7786 (bmo#1365189) + Buffer overflow while painting non-displayable SVG + * CVE-2017-7806 (bmo#1378113) + Use-after-free in layer manager with SVG + * CVE-2017-7753 (bmo#1353312) + Out-of-bounds read with cached style data and pseudo-elements# + * CVE-2017-7787 (bmo#1322896) + Same-origin policy bypass with iframes through page reloads + * CVE-2017-7807 (bmo#1376459) + Domain hijacking through AppCache fallback + * CVE-2017-7792 (bmo#1368652) + Buffer overflow viewing certificates with an extremely long OID + * CVE-2017-7804 (bmo#1372849) + Memory protection bypass through WindowsDllDetourPatcher + * CVE-2017-7791 (bmo#1365875) + Spoofing following page navigation with data: protocol and modal alerts + * CVE-2017-7808 (bmo#1367531) + CSP information leak with frame-ancestors containing paths + * CVE-2017-7782 (bmo#1344034) + WindowsDllDetourPatcher allocates memory without DEP protections + * CVE-2017-7781 (bmo#1352039) + Elliptic curve point addition error when using mixed Jacobian-affine coordinates + * CVE-2017-7794 (bmo#1374281) + Linux file truncation via sandbox broker + * CVE-2017-7803 (bmo#1377426) + CSP containing 'sandbox' improperly applied + * CVE-2017-7799 (bmo#1372509) + Self-XSS XUL injection in about:webrtc + * CVE-2017-7783 (bmo#1360842) + DOS attack through long username in URL + * CVE-2017-7788 (bmo#1073952) + Sandboxed about:srcdoc iframes do not inherit CSP directives + * CVE-2017-7789 (bmo#1074642) + Failure to enable HSTS when two STS headers are sent for a connection + * CVE-2017-7790 (bmo#1350460) (Windows-only) + Windows crash reporter reads extra memory for some non-null-terminated registry values + * CVE-2017-7796 (bmo#1234401) (Windows-only) + Windows updater can delete any file named update.log + * CVE-2017-7797 (bmo#1334776) + Response header name interning leaks across origins + * CVE-2017-7780 + Memory safety bugs fixed in Firefox 55 + * CVE-2017-7779 + Memory safety bugs fixed in Firefox 55 and Firefox ESR 52.3 - updated mozilla-kde.patch: * removed "downloadfinished" alert as Firefox reimplemented the whole thing (TODO: check if there is another function we should diff -r 038d048a3940 -r c360e9aac24a MozillaFirefox/MozillaFirefox.spec --- a/MozillaFirefox/MozillaFirefox.spec Sat Aug 05 20:31:55 2017 +0200 +++ b/MozillaFirefox/MozillaFirefox.spec Sun Sep 17 10:06:24 2017 +0200 @@ -17,11 +17,11 @@ # # changed with every update -%define major 54 +%define major 55 %define mainver %major.99 %define update_channel beta %define branding 1 -%define releasedate 20170804000000 +%define releasedate 20170914000000 # PIE, full relro (x86_64 for now) %define build_hardened 1 @@ -45,10 +45,6 @@ %define __find_requires sh %{SOURCE4} %global provfind sh -c "grep -v '.so' | %__find_provides" %global __find_provides %provfind -# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys -# Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, -# please get your own set of keys. -%define _google_api_key AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q %define localize 1 %ifarch %ix86 x86_64 %define crashreporter 1 @@ -74,8 +70,8 @@ BuildRequires: libnotify-devel BuildRequires: libproxy-devel BuildRequires: makeinfo -BuildRequires: mozilla-nspr-devel >= 4.15 -BuildRequires: mozilla-nss-devel >= 3.31 +BuildRequires: mozilla-nspr-devel >= 4.16 +BuildRequires: mozilla-nss-devel >= 3.32.1 BuildRequires: python-devel BuildRequires: startup-notification-devel BuildRequires: unzip @@ -132,7 +128,11 @@ Source15: firefox-appdata.xml Source16: MozillaFirefox.changes Source17: l10n_changesets.txt +# Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys +# Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, +# please get your own set of keys. Source18: mozilla-api-key +Source19: google-api-key # Gecko/Toolkit Patch1: mozilla-nongnome-proxies.patch Patch3: mozilla-kde.patch @@ -142,6 +142,7 @@ Patch8: mozilla-no-stdcxx-check.patch Patch9: mozilla-reduce-files-per-UnifiedBindings.patch Patch10: mozilla-aarch64-startup-crash.patch +Patch11: mozilla-ucontext.patch # Firefox/browser Patch101: firefox-kde.patch Patch102: firefox-no-default-ualocale.patch @@ -253,6 +254,7 @@ %patch9 -p1 %endif %patch10 -p1 +%patch11 -p1 # Firefox %patch101 -p1 %patch102 -p1 @@ -279,7 +281,6 @@ export MOZILLA_OFFICIAL=1 export BUILD_OFFICIAL=1 export MOZ_TELEMETRY_REPORTING=1 -export MOZ_GOOGLE_API_KEY=%{_google_api_key} %if 0%{?suse_version} <= 1320 export CC=gcc-5 %endif @@ -347,6 +348,7 @@ #ac_add_options --enable-chrome-format=jar ac_add_options --enable-update-channel=%{update_channel} ac_add_options --with-mozilla-api-keyfile=%{SOURCE18} +ac_add_options --with-google-api-keyfile=%{SOURCE19} %if %branding ac_add_options --enable-official-branding %endif diff -r 038d048a3940 -r c360e9aac24a MozillaFirefox/create-tar.sh --- a/MozillaFirefox/create-tar.sh Sat Aug 05 20:31:55 2017 +0200 +++ b/MozillaFirefox/create-tar.sh Sun Sep 17 10:06:24 2017 +0200 @@ -7,8 +7,8 @@ CHANNEL="beta" BRANCH="releases/mozilla-$CHANNEL" -RELEASE_TAG="FIREFOX_55_0b13_RELEASE" -VERSION="54.99" +RELEASE_TAG="FIREFOX_56_0b12_RELEASE" # 55.0.3 build2 +VERSION="55.99" # mozilla if [ -d mozilla ]; then @@ -40,8 +40,16 @@ echo -n "REPO=" >> ../source-stamp.txt hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" >> ../source-stamp.txt popd + +# use parallel compression, if available +compression='-J' +pixz -h > /dev/null 2>&1 +if (($? != 127)); then + compression='-Ipixz' +fi + echo "creating archive..." -tar cJf firefox-$VERSION-source.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS mozilla +tar $compression -cf firefox-$VERSION-source.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS mozilla # l10n echo "fetching locales..." @@ -60,10 +68,10 @@ esac done echo "creating l10n archive..." -tar cJf l10n-$VERSION.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n +tar $compression -cf l10n-$VERSION.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n # compare-locales echo "creating compare-locales" hg clone http://hg.mozilla.org/build/compare-locales -tar cJf compare-locales.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg compare-locales +tar $compression -cf compare-locales.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg compare-locales diff -r 038d048a3940 -r c360e9aac24a MozillaFirefox/google-api-key --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/google-api-key Sun Sep 17 10:06:24 2017 +0200 @@ -0,0 +1,1 @@ +AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q diff -r 038d048a3940 -r c360e9aac24a MozillaFirefox/l10n_changesets.txt --- a/MozillaFirefox/l10n_changesets.txt Sat Aug 05 20:31:55 2017 +0200 +++ b/MozillaFirefox/l10n_changesets.txt Sun Sep 17 10:06:24 2017 +0200 @@ -71,7 +71,7 @@ pa-IN f01bcb8c13a2 pl d76f3ba7ebd5 pt-BR 7cf0629777d1 -pt-PT 0b540f6980f5 +pt-PT a762c23994b3 rm f16da0c1a769 ro 6538d74548a9 ru 4feb4e4200f5 diff -r 038d048a3940 -r c360e9aac24a MozillaFirefox/mozilla-ucontext.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MozillaFirefox/mozilla-ucontext.patch Sun Sep 17 10:06:24 2017 +0200 @@ -0,0 +1,1 @@ +../mozilla-ucontext.patch \ No newline at end of file diff -r 038d048a3940 -r c360e9aac24a MozillaFirefox/mozilla.sh.in --- a/MozillaFirefox/mozilla.sh.in Sat Aug 05 20:31:55 2017 +0200 +++ b/MozillaFirefox/mozilla.sh.in Sun Sep 17 10:06:24 2017 +0200 @@ -103,7 +103,8 @@ export GNOME_DISABLE_CRASH_DIALOG=1 # enable xinput2 (boo#1032003) -export MOZ_USE_XINPUT2=1 +# breaks too many things right now (boo#1053959) +#export MOZ_USE_XINPUT2=1 moz_debug=0 script_args="" diff -r 038d048a3940 -r c360e9aac24a firefox-kde.patch --- a/firefox-kde.patch Sat Aug 05 20:31:55 2017 +0200 +++ b/firefox-kde.patch Sun Sep 17 10:06:24 2017 +0200 @@ -1,5 +1,5 @@ # HG changeset patch -# Parent 36e478aec136484b59a9fda90f63fa7ddc962018 +# Parent 9ccba8e6b5fad738ce924ff40b4c5aa6f4bc12dd diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul new file mode 100644 @@ -1419,9 +1419,9 @@ let defaultPerformancePref = document.getElementById("browser.preferences.defaultPerformanceSettings.enabled"); defaultPerformancePref.addEventListener("change", () => { - this.updatePerformanceSettingsBox(); + this.updatePerformanceSettingsBox({duringChangeEvent: true}); }); -@@ -779,16 +786,27 @@ var gMainPane = { +@@ -780,16 +787,27 @@ var gMainPane = { let alwaysCheckPref = document.getElementById("browser.shell.checkDefaultBrowser"); alwaysCheckPref.value = true; diff -r 038d048a3940 -r c360e9aac24a mozilla-ucontext.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mozilla-ucontext.patch Sun Sep 17 10:06:24 2017 +0200 @@ -0,0 +1,313 @@ +# HG changeset patch +# User Wolfgang Rosenauer +# Parent f6b8a48d89d77c7a3eb13fef234c618943306c2b +Replace struct ucontext with ucontext_t + +diff --git a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc +--- a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc ++++ b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc +@@ -35,25 +35,25 @@ + namespace google_breakpad { + + // Minidump defines register structures which are different from the raw + // structures which we get from the kernel. These are platform specific + // functions to juggle the ucontext and user structures into minidump format. + + #if defined(__i386__) + +-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { + return uc->uc_mcontext.gregs[REG_ESP]; + } + +-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { + return uc->uc_mcontext.gregs[REG_EIP]; + } + +-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, ++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, + const struct _libc_fpstate* fp) { + const greg_t* regs = uc->uc_mcontext.gregs; + + out->context_flags = MD_CONTEXT_X86_FULL | + MD_CONTEXT_X86_FLOATING_POINT; + + out->gs = regs[REG_GS]; + out->fs = regs[REG_FS]; +@@ -83,25 +83,25 @@ void UContextReader::FillCPUContext(RawC + out->float_save.data_selector = fp->datasel; + + // 8 registers * 10 bytes per register. + my_memcpy(out->float_save.register_area, fp->_st, 10 * 8); + } + + #elif defined(__x86_64) + +-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { + return uc->uc_mcontext.gregs[REG_RSP]; + } + +-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { + return uc->uc_mcontext.gregs[REG_RIP]; + } + +-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, ++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, + const struct _libc_fpstate* fpregs) { + const greg_t* regs = uc->uc_mcontext.gregs; + + out->context_flags = MD_CONTEXT_AMD64_FULL; + + out->cs = regs[REG_CSGSFS] & 0xffff; + + out->fs = (regs[REG_CSGSFS] >> 32) & 0xffff; +@@ -140,25 +140,25 @@ void UContextReader::FillCPUContext(RawC + out->flt_save.mx_csr = fpregs->mxcsr; + out->flt_save.mx_csr_mask = fpregs->mxcr_mask; + my_memcpy(&out->flt_save.float_registers, &fpregs->_st, 8 * 16); + my_memcpy(&out->flt_save.xmm_registers, &fpregs->_xmm, 16 * 16); + } + + #elif defined(__ARM_EABI__) + +-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { + return uc->uc_mcontext.arm_sp; + } + +-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { + return uc->uc_mcontext.arm_pc; + } + +-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { ++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { + out->context_flags = MD_CONTEXT_ARM_FULL; + + out->iregs[0] = uc->uc_mcontext.arm_r0; + out->iregs[1] = uc->uc_mcontext.arm_r1; + out->iregs[2] = uc->uc_mcontext.arm_r2; + out->iregs[3] = uc->uc_mcontext.arm_r3; + out->iregs[4] = uc->uc_mcontext.arm_r4; + out->iregs[5] = uc->uc_mcontext.arm_r5; +@@ -179,25 +179,25 @@ void UContextReader::FillCPUContext(RawC + // TODO: fix this after fixing ExceptionHandler + out->float_save.fpscr = 0; + my_memset(&out->float_save.regs, 0, sizeof(out->float_save.regs)); + my_memset(&out->float_save.extra, 0, sizeof(out->float_save.extra)); + } + + #elif defined(__aarch64__) + +-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { + return uc->uc_mcontext.sp; + } + +-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { + return uc->uc_mcontext.pc; + } + +-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, ++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, + const struct fpsimd_context* fpregs) { + out->context_flags = MD_CONTEXT_ARM64_FULL; + + out->cpsr = static_cast(uc->uc_mcontext.pstate); + for (int i = 0; i < MD_CONTEXT_ARM64_REG_SP; ++i) + out->iregs[i] = uc->uc_mcontext.regs[i]; + out->iregs[MD_CONTEXT_ARM64_REG_SP] = uc->uc_mcontext.sp; + out->iregs[MD_CONTEXT_ARM64_REG_PC] = uc->uc_mcontext.pc; +@@ -205,25 +205,25 @@ void UContextReader::FillCPUContext(RawC + out->float_save.fpsr = fpregs->fpsr; + out->float_save.fpcr = fpregs->fpcr; + my_memcpy(&out->float_save.regs, &fpregs->vregs, + MD_FLOATINGSAVEAREA_ARM64_FPR_COUNT * 16); + } + + #elif defined(__mips__) + +-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { + return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]; + } + +-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { ++uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { + return uc->uc_mcontext.pc; + } + +-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { ++void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { + #if _MIPS_SIM == _ABI64 + out->context_flags = MD_CONTEXT_MIPS64_FULL; + #elif _MIPS_SIM == _ABIO32 + out->context_flags = MD_CONTEXT_MIPS_FULL; + #else + #error "This mips ABI is currently not supported (n32)" + #endif + +diff --git a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h +--- a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h ++++ b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h +@@ -36,29 +36,29 @@ + #include "linux/dump_writer_common/raw_context_cpu.h" + #include "common/memory.h" + #include "google_breakpad/common/minidump_format.h" + + namespace google_breakpad { + + // Wraps platform-dependent implementations of accessors to ucontext structs. + struct UContextReader { +- static uintptr_t GetStackPointer(const struct ucontext* uc); ++ static uintptr_t GetStackPointer(const ucontext_t* uc); + +- static uintptr_t GetInstructionPointer(const struct ucontext* uc); ++ static uintptr_t GetInstructionPointer(const ucontext_t* uc); + + // Juggle a arch-specific ucontext into a minidump format + // out: the minidump structure + // info: the collection of register structures. + #if defined(__i386__) || defined(__x86_64) +- static void FillCPUContext(RawContextCPU *out, const ucontext *uc, ++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, + const struct _libc_fpstate* fp); + #elif defined(__aarch64__) +- static void FillCPUContext(RawContextCPU *out, const ucontext *uc, ++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, + const struct fpsimd_context* fpregs); + #else +- static void FillCPUContext(RawContextCPU *out, const ucontext *uc); ++ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc); + #endif + }; + + } // namespace google_breakpad + + #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_UCONTEXT_READER_H +diff --git a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc +--- a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc ++++ b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc +@@ -434,30 +434,30 @@ bool ExceptionHandler::HandleSignal(int + info->si_code == SI_TKILL; + if (signal_trusted || (signal_pid_trusted && info->si_pid == getpid())) { + sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); + } + + // Fill in all the holes in the struct to make Valgrind happy. + memset(&g_crash_context_, 0, sizeof(g_crash_context_)); + memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t)); +- memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext)); ++ memcpy(&g_crash_context_.context, uc, sizeof(ucontext_t)); + #if defined(__aarch64__) +- struct ucontext* uc_ptr = (struct ucontext*)uc; ++ ucontext_t* uc_ptr = (ucontext_t*)uc; + struct fpsimd_context* fp_ptr = + (struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved; + if (fp_ptr->head.magic == FPSIMD_MAGIC) { + memcpy(&g_crash_context_.float_state, fp_ptr, + sizeof(g_crash_context_.float_state)); + } + #elif !defined(__ARM_EABI__) && !defined(__mips__) + // FP state is not part of user ABI on ARM Linux. + // In case of MIPS Linux FP state is already part of struct ucontext + // and 'float_state' is not a member of CrashContext. +- struct ucontext* uc_ptr = (struct ucontext*)uc; ++ ucontext_t* uc_ptr = (ucontext_t*)uc; + if (uc_ptr->uc_mcontext.fpregs) { + memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs, + sizeof(g_crash_context_.float_state)); + } + #endif + g_crash_context_.tid = syscall(__NR_gettid); + if (crash_handler_ != NULL) { + if (crash_handler_(&g_crash_context_, sizeof(g_crash_context_), +@@ -471,17 +471,17 @@ bool ExceptionHandler::HandleSignal(int + // This is a public interface to HandleSignal that allows the client to + // generate a crash dump. This function may run in a compromised context. + bool ExceptionHandler::SimulateSignalDelivery(int sig) { + siginfo_t siginfo = {}; + // Mimic a trusted signal to allow tracing the process (see + // ExceptionHandler::HandleSignal(). + siginfo.si_code = SI_USER; + siginfo.si_pid = getpid(); +- struct ucontext context; ++ ucontext_t context; + getcontext(&context); + return HandleSignal(sig, &siginfo, &context); + } + + // This function may run in a compromised context: see the top of the file. + bool ExceptionHandler::GenerateDump(CrashContext *context) { + if (IsOutOfProcess()) + return crash_generation_client_->RequestDump(context, sizeof(*context)); +diff --git a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h +--- a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h ++++ b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h +@@ -186,17 +186,17 @@ class ExceptionHandler { + MinidumpCallback callback, + void* callback_context); + + // This structure is passed to minidump_writer.h:WriteMinidump via an opaque + // blob. It shouldn't be needed in any user code. + struct CrashContext { + siginfo_t siginfo; + pid_t tid; // the crashing thread. +- struct ucontext context; ++ ucontext_t context; + #if !defined(__ARM_EABI__) && !defined(__mips__) + // #ifdef this out because FP state is not part of user ABI for Linux ARM. + // In case of MIPS Linux FP state is already part of struct + // ucontext so 'float_state' is not required. + fpstate_t float_state; + #endif + }; + +diff --git a/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc b/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc +--- a/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc ++++ b/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc +@@ -566,17 +566,17 @@ class MicrodumpWriter { + ++iter) { + DumpModule(iter->first, false, 0, iter->second); + } + return true; + } + + void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); } + +- const struct ucontext* const ucontext_; ++ const ucontext_t* const ucontext_; + #if !defined(__ARM_EABI__) && !defined(__mips__) + const google_breakpad::fpstate_t* const float_state_; + #endif + LinuxDumper* dumper_; + const MappingList& mapping_list_; + const MicrodumpExtraInfo microdump_extra_info_; + char* log_line_; + }; +diff --git a/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc b/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc +--- a/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc ++++ b/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc +@@ -1242,17 +1242,17 @@ class MinidumpWriter { + return false; + return WriteFile(result, buf); + } + + // Only one of the 2 member variables below should be set to a valid value. + const int fd_; // File descriptor where the minidum should be written. + const char* path_; // Path to the file where the minidum should be written. + +- const struct ucontext* const ucontext_; // also from the signal handler ++ const ucontext_t* const ucontext_; // also from the signal handler + #if !defined(__ARM_EABI__) && !defined(__mips__) + const google_breakpad::fpstate_t* const float_state_; // ditto + #endif + LinuxDumper* dumper_; + MinidumpFileWriter minidump_writer_; + off_t minidump_size_limit_; + MDLocationDescriptor crashing_thread_context_; + // Blocks of memory written to the dump. These are all currently diff -r 038d048a3940 -r c360e9aac24a series --- a/series Sat Aug 05 20:31:55 2017 +0200 +++ b/series Sun Sep 17 10:06:24 2017 +0200 @@ -8,6 +8,7 @@ mozilla-no-stdcxx-check.patch mozilla-reduce-files-per-UnifiedBindings.patch mozilla-aarch64-startup-crash.patch +mozilla-ucontext.patch # Firefox patches firefox-kde.patch