[Mesa-dev] [PATCH 00/13] Fix context creation error handling

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Tue May 5 04:25:16 PDT 2015

This is a resend, the earlier set seem to have gone into void.

This set was collected with intentionally failing at context
creation and then fixing all the places where segfault resulted.
Some of the places where null is being checked are a bit funny
but its only because during first time context creation things
have not yet settled properly. After this set Waffle is able to
correctly report if there was failure during context creation,
before this set only possible result is segfault.


Juha-Pekka Heikkila (13):
  mesa/meta: Don't free meta if it was never initialized
  i965: If cache has no BO don't try to unmap BO
  mesa/main: Don't go freeing texture data which was never allocated
  mesa/main: Don't go freeing pipeline data which is not reserved
  mesa/program: Don't clear caches which are not allocated
  mesa/main: Don't free QueryObjects which were never allocated
  mesa/main: Don't free unallocated vertex array state
  mesa/main: Don't go deleting unallocated TransformFeedbackObjects
  mesa/main: Don't free unallocated performance monitor
  mesa/main: Check context pointer in _mesa_error before using it
  i965: Add missing return on error path
  mesa/main: Don't proceed on deleting null hash table
  mesa/main: Verify context creation on progress

 src/mesa/drivers/common/meta.c                   |  3 ++
 src/mesa/drivers/dri/i965/brw_state_cache.c      | 11 ++--
 src/mesa/drivers/dri/i965/intel_buffer_objects.c |  1 +
 src/mesa/main/errors.c                           | 26 ++++++----
 src/mesa/main/hash.c                             |  3 +-
 src/mesa/main/performance_monitor.c              |  8 +--
 src/mesa/main/pipelineobj.c                      |  9 ++--
 src/mesa/main/queryobj.c                         |  6 ++-
 src/mesa/main/shared.c                           | 66 ++++++++++++++++++++++--
 src/mesa/main/texstate.c                         |  6 ++-
 src/mesa/main/transformfeedback.c                | 12 +++--
 src/mesa/main/varray.c                           |  6 ++-
 src/mesa/program/prog_cache.c                    | 16 +++---
 13 files changed, 132 insertions(+), 41 deletions(-)


More information about the mesa-dev mailing list