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

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Fri Nov 28 03:25:00 PST 2014


This set fixes context creation error handling. Currently if
there was any error during context creation it would automatically
cause segfault. There are many very small patches because they touch
very different areas but any if unhandled could cause segfaulting in
problematic situation. Valgrind did like this set with reduced memory
leakiness (when erroring) and Waffle seems to be able now to report 
about which problem was met at context creation.

As an unexpected side nuance with these patches 
read-front clear-front-first samples=2 and 
read-front clear-front-first samples=4 tests in Piglit start to pass.

/Juha-Pekka

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                         | 13 +++--
 src/mesa/main/transformfeedback.c                | 12 +++--
 src/mesa/main/varray.c                           |  6 ++-
 src/mesa/program/prog_cache.c                    | 16 +++---
 13 files changed, 137 insertions(+), 43 deletions(-)

-- 
1.8.5.1



More information about the mesa-dev mailing list