New issue
Advanced search Search tips

Issue 697998 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 27
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Preliminary blacklisted features can be used uninitialized

Project Member Reported by sugoi@chromium.org, Mar 2 2017

Issue description

The issue is the following:

Looking at:
https://cs.chromium.org/chromium/src/content/browser/gpu/gpu_data_manager_impl_private.cc?type=cs&l=1203

  UpdateGpuInfo(gpu_info);
  UpdateGpuSwitchingManager(gpu_info);
  UpdatePreliminaryBlacklistedFeatures();

In this case, GpuAccessAllowed() can get called here:
UpdateGpuInfo()
  -> UpdateGpuInfoHelper()
    -> UpdateBlacklistedFeatures()
      -> EnableSwiftShaderIfNecessary()
        -> GpuAccessAllowed()

In this scenario, GpuAccessAllowed() returns false here:
https://cs.chromium.org/chromium/src/content/browser/gpu/gpu_data_manager_impl_private.cc?type=cs&l=388

The reason it returns false is that UpdatePreliminaryBlacklistedFeatures() hasn't been called yet.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2df232659f116970f80a6d492ec5945173690e2c

commit 2df232659f116970f80a6d492ec5945173690e2c
Author: sugoi <sugoi@chromium.org>
Date: Thu Mar 02 23:31:14 2017

Prevent preliminary blacklisted features from being used too early

EnableSwiftShaderIfNecessary() was calling GpuAccessAllowed()
before UpdatePreliminaryBlacklistedFeatures() was called, causing
GpuAccessAllowed() to return false because of the uninitialized
preliminary blacklisted features list. This simply adds a check
that prevents using uninitialized data.

BUG= 697998 

Review-Url: https://codereview.chromium.org/2727273003
Cr-Commit-Position: refs/heads/master@{#454432}

[modify] https://crrev.com/2df232659f116970f80a6d492ec5945173690e2c/content/browser/gpu/gpu_data_manager_impl_private.cc
[modify] https://crrev.com/2df232659f116970f80a6d492ec5945173690e2c/content/browser/gpu/gpu_data_manager_impl_private.h

Status: Fixed (was: Assigned)
This should probably have been fixed when the cl landed.

Sign in to add a comment