[Mesa-dev] [Bug 97136] [softpipe] piglit egl-create-context-verify-gl-flavor regression

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jul 29 20:38:54 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=97136

            Bug ID: 97136
           Summary: [softpipe] piglit egl-create-context-verify-gl-flavor
                    regression
           Product: Mesa
           Version: git
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Keywords: bisected, regression
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: vlee at freedesktop.org
        QA Contact: mesa-dev at lists.freedesktop.org
                CC: emil.l.velikov at gmail.com, fdo-bugs at engestrom.ch,
                    nicolas at boichat.ch

mesa: b107169eef92e740180df468d1eae4cc61a52757 (12.1.0-devel)

$ ./bin/egl-create-context-verify-gl-flavor -auto
info: request an OpenGL 1.0 context
Segmentation fault (core dumped)

(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00000000004011ec in get_gl_version () at
piglit/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c:102
#2  0x0000000000401751 in check_flavor (requested_version=10,
requested_api=API_GL_COMPAT) at
piglit/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c:257
#3  0x0000000000401b4e in check_opengl () at
piglit/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c:360
#4  0x00000000004024ac in main (argc=2, argv=0x7fffa9d82f78) at
piglit/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c:491
(gdb) frame 1
#1  0x00000000004011ec in get_gl_version () at
piglit/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c:102
102             version_string = (const char*) my_glGetString(GL_VERSION);
(gdb) print my_glGetString
$1 = (const char *(*)(GLenum)) 0x0


9ee683f877b283020c6f24776236f1145cb7a4ea is the first bad commit
commit 9ee683f877b283020c6f24776236f1145cb7a4ea
Author: Nicolas Boichat <drinkcat at chromium.org>
Date:   Fri Jul 22 11:27:41 2016 +0800

    egl/dri2: Add reference count for dri2_egl_display

    android.opengl.cts.WrapperTest#testGetIntegerv1 CTS test calls
    eglTerminate, followed by eglReleaseThread. A similar case is
    observed in this bug: https://bugs.freedesktop.org/show_bug.cgi?id=69622,
    where the test calls eglTerminate, then eglMakeCurrent(dpy, NULL, NULL,
NULL).

    With the current code, dri2_dpy structure is freed on eglTerminate
    call, so the display is not initialized when eglReleaseThread calls
    MakeCurrent with NULL parameters, to unbind the context, which
    causes a a segfault in drv->API.MakeCurrent (dri2_make_current),
    either in glFlush or in a latter call.

    eglTerminate specifies that "If contexts or surfaces associated
    with display is current to any thread, they are not released until
    they are no longer current as a result of eglMakeCurrent."

    However, to properly free the current context/surface (i.e., call
    glFlush, unbindContext, driDestroyContext), we still need the
    display vtbl (and possibly an active dri dpy connection). Therefore,
    we add some reference counter to dri2_egl_display, to make sure
    the structure is kept allocated as long as it is required.

    One drawback of this is that eglInitialize may not completely reinitialize
    the display (if eglTerminate was called with a current context), however,
    this seems to meet the EGL spec quite well, and does not permanently
    leak any context/display even for incorrectly written apps.

    Cc: "12.0" <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Nicolas Boichat <drinkcat at chromium.org>
    Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
    Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

:040000 040000 e85e5c29d107c99c0c163074ad701d587efe9d70
40574abb1fa0fb3f7cdbedf970815b745d08b0de M      src
bisect run success

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160729/41bad24a/attachment.html>


More information about the mesa-dev mailing list