diff -r af5e283c2e5d -r 849d6343405b mozilla-bmo1725828.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mozilla-bmo1725828.patch Fri Oct 01 12:00:20 2021 +0200 @@ -0,0 +1,555 @@ +# HG changeset patch +# Parent 95d077d47f452a241c5826b5aea762b549bb24ff + + + + + + 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
+@@ -868,18 +868,31 @@ 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
++
+   GMPCapability video;
+-
+   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