1. 09 Dec, 2014 31 commits
  2. 08 Dec, 2014 5 commits
  3. 05 Dec, 2014 3 commits
    • Jon Turney's avatar
      glx: Fix crash when a client exits without deleting GL contexts · bc71081f
      Jon Turney authored
      
      
      With the previous patches applied, we now have crash due to use-after-free when
      a client exits without deleting all it's GL contexts
      
      On client exit, CloseDownClient first calls glxClientCallback() with
      ClientStateGone, which calls __glXFreeContext() directly.
      
      Subsequently CloseDownClient() frees all the clients resources, which leads to
      ContextGone() being called for a context resource where the context has already
      been freed.
      
      Fix this by modifiying glxClientCallback() to free the context resource.
      
      Also make __glXFreeContext() static, as calling it directly leads to this
      problem, instead the context resource should be released.
      
      With the previous patches applied, this can be demonstrated with e.g. glxinfo,
      which doesn't delete it's context before exit.
      Signed-off-by: Jon Turney's avatarJon TURNEY <jon.turney@dronecode.org.uk>
      Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      bc71081f
    • Jon Turney's avatar
      glx: Flush context which is being made non-current due to drawable going away · 5c606c0a
      Jon Turney authored
      
      
      Some sequences of glean tests fail with GLXBadCurrentWindow when using indirect
      rendering, e.g. glean -t 'fpexceptions getString'.
      
      Flush a context which is being made non-current due to the drawable on which is
      it is current going away.  Waiting until another context is made current is too
      late, as the drawable no longer exists.
      
      v2: Rewrite for direct GL dispatch
      
      v3: Inline FlushContext(), doesn't need to be a separate function
      
      e.g. LIBGL_ALWAYS_INDIRECT=1  ./glean -r results -o --quick -t "fpexceptions
      getString" fails with a BadContextTag error.
      Signed-off-by: Jon Turney's avatarJon TURNEY <jon.turney@dronecode.org.uk>
      Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      5c606c0a
    • Jon Turney's avatar
      Revert "glx: Simplify glXDestroyContext" · 437b2749
      Jon Turney authored
      This reverts commit 7f5adf73
      
      .
      
      This seems to miss the whole point of the idExists flag, as it makes the
      lifetime of that being true the same as the lifetime of the Context resource.
      
      The previously current context tag is always given in a MakeContextCurrent
      request, even if that context tag is no longer valid (for example, the context
      has been deleted), so this leads to BadContextTag errors.
      
      See fd.o bug #30089 for the makecurrenttest.c testcase, and some discussion of
      previous manifestations of this bug.
      Signed-off-by: Jon Turney's avatarJon TURNEY <jon.turney@dronecode.org.uk>
      Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      437b2749
  4. 30 Nov, 2014 1 commit