mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
56ddaaa380
When making a new surface/context pair current, mesa may want to flush the old context. Make sure we don't try to flush any freed memory by unmaking a surface/context pair current before freeing it. Not doing this results in the following valgrind warnings: ==15986== Invalid read of size 8 ==15986== at 0x69A6D80: dri_flush_front_buffer (gbm_dri.c:92) ==15986== by 0x1750D458: intel_flush_front (brw_context.c:251) ==15986== by 0x1750D4BB: intel_glFlush (brw_context.c:296) ==15986== by 0x1739D8DD: dri2_make_current (egl_dri2.c:1461) ==15986== by 0x17393A3A: eglMakeCurrent (eglapi.c:869) ==15986== by 0x54381FB: InternalMakeCurrentVendor (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0) ==15986== by 0x5438515: eglMakeCurrent (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0) ==15986== by 0x522A782: _cogl_winsys_egl_make_current (cogl-winsys-egl.c:303) ==15986== by 0x49B64C8: meta_renderer_native_create_view (meta-renderer-native.c:3076) ==15986== by 0x48D26E7: meta_renderer_create_view (meta-renderer.c:78) ==15986== by 0x48D277A: meta_renderer_rebuild_views (meta-renderer.c:111) ==15986== by 0x49BF46E: meta_stage_native_rebuild_views (meta-stage-native.c:142) ==15986== Address 0x1b076600 is 0 bytes inside a block of size 48 free'd ==15986== at 0x4839A0C: free (vg_replace_malloc.c:540) ==15986== by 0x49B59F3: meta_renderer_native_release_onscreen (meta-renderer-native.c:2651) ==15986== by 0x5211441: _cogl_onscreen_free (cogl-onscreen.c:167) ==15986== by 0x5210D81: _cogl_object_onscreen_indirect_free (cogl-onscreen.c:51) ==15986== by 0x51D0066: _cogl_object_default_unref (cogl-object.c:103) ==15986== by 0x520F989: _cogl_framebuffer_unref (cogl-framebuffer.c:1814) ==15986== by 0x51D00B1: cogl_object_unref (cogl-object.c:115) ==15986== by 0x536F3C7: clutter_stage_view_dispose (clutter-stage-view.c:304) ==15986== by 0x4B7DAF2: g_object_unref (gobject.c:3309) ==15986== by 0x4A9596C: g_list_foreach (glist.c:1013) ==15986== by 0x4A9599A: g_list_free_full (glist.c:223) ==15986== by 0x48D2737: meta_renderer_rebuild_views (meta-renderer.c:100) ==15986== Block was alloc'd at ==15986== at 0x483AB1A: calloc (vg_replace_malloc.c:762) ==15986== by 0x69A76B2: gbm_dri_surface_create (gbm_dri.c:1252) ==15986== by 0x69A6BFE: gbm_surface_create (gbm.c:600) ==15986== by 0x49B4E29: meta_renderer_native_create_surface_gbm (meta-renderer-native.c:2221) ==15986== by 0x49B57DB: meta_onscreen_native_allocate (meta-renderer-native.c:2569) ==15986== by 0x49B6423: meta_renderer_native_create_view (meta-renderer-native.c:3062) ==15986== by 0x48D26E7: meta_renderer_create_view (meta-renderer.c:78) ==15986== by 0x48D277A: meta_renderer_rebuild_views (meta-renderer.c:111) ==15986== by 0x49BF46E: meta_stage_native_rebuild_views (meta-stage-native.c:142) ==15986== by 0x49A75B5: meta_backend_native_update_screen_size (meta-backend-native.c:520) ==15986== by 0x48B01BB: meta_backend_sync_screen_size (meta-backend.c:224) ==15986== by 0x48B09B7: meta_backend_real_post_init (meta-backend.c:501) https://gitlab.gnome.org/GNOME/mutter/merge_requests/622 |
||
---|---|---|
.. | ||
dbus-utils.c | ||
dbus-utils.h | ||
gen-default-modes.py | ||
meta-backend-native-private.h | ||
meta-backend-native.c | ||
meta-backend-native.h | ||
meta-barrier-native.c | ||
meta-barrier-native.h | ||
meta-clutter-backend-native.c | ||
meta-clutter-backend-native.h | ||
meta-crtc-kms.c | ||
meta-crtc-kms.h | ||
meta-cursor-renderer-native.c | ||
meta-cursor-renderer-native.h | ||
meta-drm-buffer-dumb.c | ||
meta-drm-buffer-dumb.h | ||
meta-drm-buffer-gbm.c | ||
meta-drm-buffer-gbm.h | ||
meta-drm-buffer.c | ||
meta-drm-buffer.h | ||
meta-gpu-kms.c | ||
meta-gpu-kms.h | ||
meta-input-settings-native.c | ||
meta-input-settings-native.h | ||
meta-launcher.c | ||
meta-launcher.h | ||
meta-monitor-manager-kms.c | ||
meta-monitor-manager-kms.h | ||
meta-output-kms.c | ||
meta-output-kms.h | ||
meta-renderer-native-gles3.c | ||
meta-renderer-native-gles3.h | ||
meta-renderer-native.c | ||
meta-renderer-native.h | ||
meta-stage-native.c | ||
meta-stage-native.h |