← Back to team overview

desktop-packages team mailing list archive

[Bug 1414999] [NEW] double free in mir egl display when calling eglTerminate and gbm_device_destroy

 

Public bug reported:

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.

** Affects: mesa (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: mir (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: mir (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to mesa in Ubuntu.
https://bugs.launchpad.net/bugs/1414999

Title:
  double free in mir egl display when calling eglTerminate and
  gbm_device_destroy

Status in mesa package in Ubuntu:
  New
Status in mir package in Ubuntu:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1414999/+subscriptions


Follow ups

References