[Mesa-dev] [Bug 69071] New: _eglGetNativePlatform should not fall back to build-time configuration

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Sep 7 07:57:58 PDT 2013


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

          Priority: medium
            Bug ID: 69071
          Assignee: mesa-dev at lists.freedesktop.org
           Summary: _eglGetNativePlatform should not fall back to
                    build-time configuration
          Severity: minor
    Classification: Unclassified
                OS: Linux (All)
          Reporter: guillaume.melquiond at gmail.com
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: git
         Component: EGL
           Product: Mesa

In src/egl/main/egldisplay.c, function _eglGetNativePlatform looks at the
content of nativeDisplay. If this content does not match any of the supported
platforms, it returns one of the platforms selected at configure time (the
first one?).

As a consequence, if Mesa is configured without X11 support for EGL and you try
to run an EGL application under X, nativeDisplay contains the value returned by
XOpenDisplay; then _eglNativePlatformDetectNativeDisplay returns
_EGL_INVALID_PLATFORM; finally _eglGetNativePlatform falls back to
_EGL_PLATFORM_WAYLAND (for instance). Mesa ends up crashing in
src/egl/drivers/dri2/platform_wayland.c because dri2_dpy->wl_dpy does not point
to a wl_display structure.

Note that _eglNativePlatformDetectNativeDisplay correctly infers that the
platform cannot be Wayland (since nativeDisplay does not point to a Wayland
structure), still _eglGetNativePlatform falls back to it. Platform types ruled
out by _eglNativePlatformDetectNativeDisplay should never be returned by
_eglGetNativePlatform.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130907/dc355bc0/attachment.html>


More information about the mesa-dev mailing list