double free in mir egl display when calling eglTerminate and gbm_device_destroy

Bug #1414999 reported by Maarten Lankhorst
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mesa (Ubuntu)
Fix Released
High
Alexandros Frantzis

Bug Description

In my standalone Xmir I do the following things:

/* Init code */
if (xmir_screen->gbm) /* NULL on !mesa */
    mir_connection_drm_set_gbm_device(xmir_screen->conn, xmir_screen->gbm);

xmir_screen->egl_display = eglGetDisplay(mir_connection_get_egl_native_display(xmir_screen->conn));

/* Shutdown code */
    eglTerminate(xmir_screen->egl_display);

    if (xmir_screen->gbm)
        gbm_device_destroy(xmir_screen->gbm);

This works as expected when gbm is NULL, but I'm getting a double free in gbm_device_destroy with the eglTerminate.
Calling eglGetDisplay(xmir_screen->gbm) instead works as expected.

Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :
summary: - double free in mir when calling eglTerminate and gbm_device_destroy
+ double free in mir egl display when calling eglTerminate and
+ gbm_device_destroy
Changed in mir:
importance: Undecided → High
Changed in mir:
assignee: nobody → Alexandros Frantzis (afrantzis)
Changed in mesa (Ubuntu):
assignee: nobody → Alexandros Frantzis (afrantzis)
Changed in mir:
milestone: none → 0.12.0
Changed in mir:
status: New → In Progress
Changed in mesa (Ubuntu):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mesa - 10.4.2-2ubuntu5

---------------
mesa (10.4.2-2ubuntu5) vivid; urgency=medium

  * Fix ftbfs from no longer including libmirclient-dev.
 -- Maarten Lankhorst <email address hidden> Wed, 11 Feb 2015 09:21:54 +0100

Changed in mesa (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Anything left to fix in Mir or was it all fixed in Mesa?

Changed in mir:
status: In Progress → Incomplete
Changed in mir (Ubuntu):
status: New → Incomplete
Changed in mir:
milestone: 0.12.0 → none
no longer affects: mir
no longer affects: mir (Ubuntu)
Changed in mesa (Ubuntu):
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.