Title: [194094] trunk/Source/WebKit2
- Revision
- 194094
- Author
- [email protected]
- Date
- 2015-12-14 22:08:19 -0800 (Mon, 14 Dec 2015)
Log Message
<rdar://problem/23886216> REGRESSION (r194022): Production builds of PluginProcess crash on launch when not installed in /System
https://bugs.webkit.org/show_bug.cgi?id=152291
Reviewed by Darin Adler.
* Configurations/PluginProcess.xcconfig: Added a FIXME.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::addDYLDEnvironmentAdditions): Set DYLD_LIBRARY_PATH to point to where the shims
are. This is needed because starting in El Capitan, the processes’ main executables link
directly against the shims, so the dynamic linker needs to be able to find them in the
non-/System location. Also added a FIXME about not having to set DYLD_INSERT_LIBRARIES when
the main executables link the them directly.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (194093 => 194094)
--- trunk/Source/WebKit2/ChangeLog 2015-12-15 05:15:52 UTC (rev 194093)
+++ trunk/Source/WebKit2/ChangeLog 2015-12-15 06:08:19 UTC (rev 194094)
@@ -1,3 +1,18 @@
+2015-12-14 Dan Bernstein <[email protected]>
+
+ <rdar://problem/23886216> REGRESSION (r194022): Production builds of PluginProcess crash on launch when not installed in /System
+ https://bugs.webkit.org/show_bug.cgi?id=152291
+
+ Reviewed by Darin Adler.
+
+ * Configurations/PluginProcess.xcconfig: Added a FIXME.
+ * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+ (WebKit::addDYLDEnvironmentAdditions): Set DYLD_LIBRARY_PATH to point to where the shims
+ are. This is needed because starting in El Capitan, the processes’ main executables link
+ directly against the shims, so the dynamic linker needs to be able to find them in the
+ non-/System location. Also added a FIXME about not having to set DYLD_INSERT_LIBRARIES when
+ the main executables link the them directly.
+
2015-12-14 Simon Fraser <[email protected]>
Dump some more data in the RemoteLayerTreeTransaction
Modified: trunk/Source/WebKit2/Configurations/PluginProcess.xcconfig (194093 => 194094)
--- trunk/Source/WebKit2/Configurations/PluginProcess.xcconfig 2015-12-15 05:15:52 UTC (rev 194093)
+++ trunk/Source/WebKit2/Configurations/PluginProcess.xcconfig 2015-12-15 06:08:19 UTC (rev 194094)
@@ -28,7 +28,7 @@
CODE_SIGN_ENTITLEMENTS = Configurations/PluginService.entitlements;
OTHER_LDFLAGS = $(OTHER_LDFLAGS) $(LDFLAGS_SHIM_$(CONFIGURATION));
-
+// FIXME: Do this for all configurations, because the process launcher sets DYLD_LIBRARY_PATH.
LDFLAGS_SHIM_Production[sdk=macosx*] = $(LDFLAGS_SHIM_$(WK_LINK_SHIM));
LDFLAGS_SHIM_YES = $(BUILT_PRODUCTS_DIR)/PluginProcessShim.dylib;
Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm (194093 => 194094)
--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm 2015-12-15 05:15:52 UTC (rev 194093)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm 2015-12-15 06:08:19 UTC (rev 194094)
@@ -122,8 +122,10 @@
// To make engineering builds work, if the path is outside of /System set up
// DYLD_FRAMEWORK_PATH to pick up other frameworks, but don't do it for the
// production configuration because it involves extra file system access.
- if (isWebKitDevelopmentBuild)
+ if (isWebKitDevelopmentBuild) {
environmentVariables.appendValue("DYLD_FRAMEWORK_PATH", [frameworksPath fileSystemRepresentation], ':');
+ environmentVariables.appendValue("DYLD_LIBRARY_PATH", webKitBundle.privateFrameworksPath.fileSystemRepresentation, ':');
+ }
#if ASAN_ENABLED
static const char* asanLibraryPath = copyASanDynamicLibraryPath();
@@ -134,6 +136,7 @@
#endif
#if PLATFORM(MAC)
+ // FIXME: In El Capitan and later, do this only for development builds, because in production, the executables link directly against the shims.
if (auto shimPath = computeProcessShimPath(launchOptions, webKitBundle)) {
// Make sure that the shim library file exists and insert it.
const char* processShimPath = [shimPath fileSystemRepresentation];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes