WebKit Bugzilla
Attachment 341289 Details for
Bug 185611
: [GTK][WPE]: Avoid using uninitialized launchOptions in getLaunchOptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Update to avoid `enumeration value 'None' not handled in switch` issues in Apple's code.
GTKWPE-Avoid-using-uninitialized-launchOptions-in-.patch (text/plain), 4.14 KB, created by
Thibault Saunier
on 2018-05-25 08:46:57 PDT
(
hide
)
Description:
Update to avoid `enumeration value 'None' not handled in switch` issues in Apple's code.
Filename:
MIME Type:
Creator:
Thibault Saunier
Created:
2018-05-25 08:46:57 PDT
Size:
4.14 KB
patch
obsolete
>From 57f29656ad1bfce40936ec0e1cf21f48755a7ec9 Mon Sep 17 00:00:00 2001 >From: Thibault Saunier <tsaunier@igalia.com> >Date: Mon, 14 May 2018 10:18:02 -0400 >Subject: [PATCH xserver] [GTK][WPE]: Avoid using uninitialized launchOptions > in getLaunchOptions > >Otherwise we might get segfault > >https://bugs.webkit.org/show_bug.cgi?id=185611 >--- > Source/WebKit/ChangeLog | 17 +++++++++++++++++ > Source/WebKit/UIProcess/ChildProcessProxy.cpp | 2 ++ > .../WebKit/UIProcess/Launcher/ProcessLauncher.h | 3 ++- > .../Launcher/mac/ProcessLauncherMac.mm | 2 ++ > .../UIProcess/Plugins/PluginProcessProxy.cpp | 2 +- > 5 files changed, 24 insertions(+), 2 deletions(-) > >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index d8bab34f1fb..39c8ee2bc61 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2018-05-14 Thibault Saunier <tsaunier@igalia.com> >+ >+ [GTK][WPE]: Avoid using uninitialized launchOptions in getLaunchOptions >+ https://bugs.webkit.org/show_bug.cgi?id=185611 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Otherwise we might segfault. >+ And make sure to initialize `LaunchOptions::processType` to a meaningful value in >+ case. >+ >+ * UIProcess/ChildProcessProxy.cpp: >+ (WebKit::ChildProcessProxy::getLaunchOptions): >+ * UIProcess/Launcher/ProcessLauncher.h: >+ * UIProcess/Plugins/PluginProcessProxy.cpp: >+ (WebKit::PluginProcessProxy::getLaunchOptions): >+ > 2018-05-24 Dan Bernstein <mitz@apple.com> > > ProcessLauncherMac.mm contains a couple of meaningless #ifndef directives >diff --git a/Source/WebKit/UIProcess/ChildProcessProxy.cpp b/Source/WebKit/UIProcess/ChildProcessProxy.cpp >index bdff583d3b1..4559c4b82a9 100644 >--- a/Source/WebKit/UIProcess/ChildProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/ChildProcessProxy.cpp >@@ -75,6 +75,8 @@ void ChildProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchO > case ProcessLauncher::ProcessType::Storage: > varname = "STORAGE_PROCESS_CMD_PREFIX"; > break; >+ case ProcessLauncher::ProcessType::None: >+ ASSERT_NOT_REACHED(); > } > const char* processCmdPrefix = getenv(varname); > if (processCmdPrefix && *processCmdPrefix) >diff --git a/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h b/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h >index 3ababbcceed..b06ca3fe8b4 100644 >--- a/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h >+++ b/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h >@@ -58,10 +58,11 @@ public: > #endif > Network, > Storage, >+ None, > }; > > struct LaunchOptions { >- ProcessType processType; >+ ProcessType processType = { ProcessType::None }; > WebCore::ProcessIdentifier processIdentifier; > HashMap<String, String> extraInitializationData; > bool nonValidInjectedCodeAllowed { false }; >diff --git a/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm b/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm >index 31105e4703c..5b8ede5f069 100644 >--- a/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm >+++ b/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm >@@ -68,6 +68,8 @@ static const char* serviceName(const ProcessLauncher::LaunchOptions& launchOptio > case ProcessLauncher::ProcessType::Plugin64: > return "com.apple.WebKit.Plugin.64"; > #endif >+ case ProcessLauncher::ProcessType::None: >+ return "Unknown"; > } > } > >diff --git a/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp b/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp >index 7a39f5b1aea..326ae2a749e 100644 >--- a/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp >@@ -88,8 +88,8 @@ PluginProcessProxy::~PluginProcessProxy() > > void PluginProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) > { >- ChildProcessProxy::getLaunchOptions(launchOptions); > platformGetLaunchOptions(launchOptions, m_pluginProcessAttributes); >+ ChildProcessProxy::getLaunchOptions(launchOptions); > } > > void PluginProcessProxy::processWillShutDown(IPC::Connection& connection) >-- >2.17.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
cdumez
:
review-
cdumez
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185611
:
340313
|
340321
|
340429
|
340488
|
341270
|
341289
|
342812