diff -r c384af864671 -r 7481543bab31 mozilla-bmo1725828.patch --- a/mozilla-bmo1725828.patch Sat Dec 04 11:19:16 2021 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,553 +0,0 @@ -# HG changeset patch -# Parent fbca0d2a522cd1ab78001476293d3d79bfabb4cf - - - - - - Tree - rpms/firefox - src.fedoraproject.org - - - - - - - - - - - - - - - - - - -
- - -
-
-
-
-
-
-

-

-
-
-

-rpms / firefox -

-
-
-
-
-
-
- - - Clone - - - -
-
-
-
- - -
-
- -
-
-
-
-
- -
-
- -
- -
-
-
- - -
- - Blob - - Blame - - History - - Raw -
- -
diff -up firefox-92.0/dom/media/gmp/GMPChild.cpp.1725828 firefox-92.0/dom/media/gmp/GMPChild.cpp
-
-diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp
---- a/dom/media/gmp/GMPChild.cpp
-+++ b/dom/media/gmp/GMPChild.cpp
-@@ -227,18 +227,24 @@ mozilla::ipc::IPCResult GMPChild::RecvPr
-               .EqualsASCII(lib.Data(), lib.Length())) {
-         LoadLibraryW(char16ptr_t(whiteListedLib));
-         break;
-       }
-     }
-   }
- #elif defined(XP_LINUX)
-   constexpr static const char* whitelist[] = {
-+      // NSS libraries used by clearkey.
-       "libfreeblpriv3.so",
-       "libsoftokn3.so",
-+      // glibc libraries merged into libc.so.6; see bug 1725828 and
-+      // the corresponding code in GMPParent.cpp.
-+      "libdl.so.2",
-+      "libpthread.so.0",
-+      "librt.so.1",
-   };
- 
-   nsTArray libs;
-   SplitAt(", ", aLibs, libs);
-   for (const nsCString& lib : libs) {
-     for (const char* whiteListedLib : whitelist) {
-       if (lib.EqualsASCII(whiteListedLib)) {
-         auto libHandle = dlopen(whiteListedLib, RTLD_NOW | RTLD_GLOBAL);
-@@ -251,17 +257,17 @@ mozilla::ipc::IPCResult GMPChild::RecvPr
-           if (error) {
-             // We should always have an error, but gracefully handle just in
-             // case.
-             nsAutoCString nsError{error};
-             CrashReporter::AppendAppNotesToCrashReport(nsError);
-           }
-           // End bug 1698718 logging.
- 
--          MOZ_CRASH("Couldn't load lib needed by NSS");
-+          MOZ_CRASH("Couldn't load lib needed by media plugin");
-         }
-       }
-     }
-   }
- #endif
-   return IPC_OK();
- }
- 
-diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp
---- a/dom/media/gmp/GMPParent.cpp
-+++ b/dom/media/gmp/GMPParent.cpp
-@@ -871,16 +871,30 @@ RefPtr GMPParent::ParseC
-     mLibs = "dxva2.dll"_ns;
- #endif
-   } else {
-     GMP_PARENT_LOG_DEBUG("%s: Unrecognized key system: %s, failing.",
-                          __FUNCTION__, mDisplayName.get());
-     return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
-   }
- 
-+#ifdef XP_LINUX
-+  // These glibc libraries were merged into libc.so.6 as of glibc
-+  // 2.34; they now exist only as stub libraries for compatibility and
-+  // newly linked code won't depend on them, so we need to ensure
-+  // they're loaded for plugins that may have been linked against a
-+  // different version of glibc.  (See also bug 1725828.)
-+  if (!mDisplayName.EqualsASCII("clearkey")) {
-+    if (!mLibs.IsEmpty()) {
-+      mLibs.AppendLiteral(", ");
-+    }
-+    mLibs.AppendLiteral("libdl.so.2, libpthread.so.0, librt.so.1");
-+  }
-+#endif
-+
-   nsCString codecsString = NS_ConvertUTF16toUTF8(m.mX_cdm_codecs);
-   nsTArray codecs;
-   SplitAt(",", codecsString, codecs);
- 
-   // Parse the codec strings in the manifest and map them to strings used
-   // internally by Gecko for capability recognition.
-   //
-   // Google's code to parse manifests can be used as a reference for strings