[Webkit-unassigned] [Bug 185611] [GTK][WPE]: Avoid trying to getenv with an unset varname

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 14 16:05:32 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=185611

--- Comment #29 from Carlos Eduardo Ramalho <cadubentzen at gmail.com> ---
(In reply to Chris Dumez from comment #28)
> Comment on attachment 341289 [details]
> Update to avoid `enumeration value 'None' not handled in switch` issues in
> Apple's code.
> 
> Looks to me that the problem is that GTK's implementation of
> PluginProcessProxy::platformGetLaunchOptions() fails to set
> launchOptions.processType.

It does set launchOptions.processType correctly:

// in PluginProcessProxyUnix.cpp
void PluginProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions, const PluginProcessAttributes& pluginProcessAttributes)
{
    launchOptions.processType = ProcessLauncher::ProcessType::Plugin64;
    ...
}

But the call to PluginProcessProxy::platformGetLaunchOptions() goes after ChildProcessProxy::getLaunchOptions() (where the crash happens) in PluginProcessProxy::getLaunchOptions(). This patch fixes exactly that by changing the order of the calls.

The crash does not happen in Apple ports because the getenv call is inside #if ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)).

I believe launchOptions.processType will arrive uninitialized at ChildProcessProxy::getLaunchOptions() in Apple ports as well, but it just isn't used at that point yet.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180614/f304ac60/attachment-0001.html>


More information about the webkit-unassigned mailing list