Bug 1472589 - Fix parent process crash reporting in the Snap package environment. r=ted,jlorenzo
authorJed Davis <jld@mozilla.com>
Mon, 11 Feb 2019 13:49:35 +0000
changeset 458909 dbf72abf5597
parent 458908 b3e21f09ee45
child 458910 4441e86d56b9
push id35551
push usershindli@mozilla.com
push dateWed, 13 Feb 2019 21:34:09 +0000
treeherdermozilla-central@08f794a4928e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, jlorenzo
bugs1472589
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1472589 - Fix parent process crash reporting in the Snap package environment. r=ted,jlorenzo 1. The unsetting of LD_LIBRARY_PATH is removed, because it's no longer necessary and interferes with environments where it's necessary to find "system" libraries like GTK; see bug 1472589 comment #1 through #4. 2. The Snap package manifest adds a dependency on the libcurl package, so that the crash reporter can send the report. This uses the GnuTLS variant because we're already pulling in GnuTLS as a dependency of some other packages (FFmpeg and CUPS, but also the non-GnuTLS cURL packages depend on it anyway via OpenLDAP). Differential Revision: https://phabricator.services.mozilla.com/D18625
taskcluster/docker/firefox-snap/snapcraft.yaml.in
toolkit/crashreporter/nsExceptionHandler.cpp
--- a/taskcluster/docker/firefox-snap/snapcraft.yaml.in
+++ b/taskcluster/docker/firefox-snap/snapcraft.yaml.in
@@ -49,16 +49,17 @@ parts:
       - libpulse0
       - libgl1-mesa-dri
       - libgl1-mesa-glx
       - libmirclient9
       - desktop-file-utils
       - ffmpeg
       - libc-bin
       - locales-all
+      - libcurl3-gnutls
     after: [desktop-gtk3]
 
   xdg-open:
     after: [firefox]
     plugin: nil
     source: .
     install: |
       set -eux
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
@@ -749,20 +749,16 @@ static bool LaunchProgram(const XP_CHAR*
     return false;
   }
 #  else   // !XP_MACOSX
   pid_t pid = sys_fork();
 
   if (pid == -1) {
     return false;
   } else if (pid == 0) {
-    // need to clobber this, as libcurl might load NSS,
-    // and we want it to load the system NSS.
-    unsetenv("LD_LIBRARY_PATH");
-
     Unused << execl(aProgramPath, aProgramPath, aMinidumpPath, nullptr);
     _exit(1);
   }
 #  endif  // XP_MACOSX
 
   return true;
 }