Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Issue 1707283002: fix for glXGetProcAddress of egl functions in glx context

Created:
4 years, 10 months ago by danvd
Modified:
4 years, 10 months ago
Reviewers:
bsalomon
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

fix for glXGetProcAddress of egl functions in glx context When using latest nvidia blob drivers on linux (width glvnd enabled) skia crashes trying to cal eglQueryString in glx context while creating new opengl target. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1707283002

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 10 (6 generated)
danvd
When using latest nvidia blob drivers on linux (width glvnd enabled) skia crashes trying to ...
4 years, 10 months ago (2016-02-18 09:11:19 UTC) #4
danvd
Hi! I'm on arch linux. After recent nvidia blob driver update my skia-based app stopped ...
4 years, 10 months ago (2016-02-18 09:23:56 UTC) #7
hal.canary
I'm going to to take myself off this CL's reviewer list, since I don't understand ...
4 years, 10 months ago (2016-02-18 15:46:18 UTC) #9
bsalomon
4 years, 10 months ago (2016-02-18 16:11:47 UTC) #10
On 2016/02/18 09:23:56, danvd wrote:
> Hi!
> I'm on arch linux. After recent nvidia blob driver update my skia-based app
> stopped working.
> 
> after making a call:
> SkAutoTUnref<const GrGLInterface> interface(GrGLCreateNativeInterface());
> 
> there is a segmentation fault. After some research I found that there is a
> function get_egl_query_and_display (GrGLAssembleInterface.cpp) which is called
> even in glx context. 
> After some time, in GrGLExtensions::init (GrGLExtensions.cpp) there is a line:
> const char* extensions = queryString(eglDisplay, GR_EGL_EXTENSIONS);
> It returns garbage in <extensions> variable, and as a reason next call to
> eat_space_sep_strings produces a segfault. 
> 
> My patch discards all calls to glxGetProcAddress of egl-prefixed function
names
> and fixed described behavior. 
> 
> Thanks!
> 
> Regards,
> Andrew

Does this mean that glXGetProcAddress is returning a non-null ptr when queried
for "eglQueryString"? That seems really odd.

Anyway, can you simplify this just a bit to be

if (strstr(name, "egl") == name) {
     return nullptr;
}

If name is nullptr then returning nullptr is ok, no need to guard against it.
Also, can you move the comment about the if?

Powered by Google App Engine
This is Rietveld 408576698