Bug 29302 - indirect context creation segfaults
Summary: indirect context creation segfaults
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-29 13:41 UTC by Wiktor Janas
Modified: 2010-07-29 15:46 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Wiktor Janas 2010-07-29 13:41:34 UTC
this happens with current git (cd601513f5ff4f488a6f6527bb033e39ee62ffda), x server 1.7.7. any attempt to create indirect context causes segmentation fault: 

Core was generated by `glxinfo -i'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007fb300dfaa2d in indirect_bind_context (gc=0x2541b10, old=0x7fb30103d9c0, draw=39845891, read=39845891) at indirect_glx.c:140
140        if (old && !old->isDirect && old->psc->dpy == dpy)
(gdb) print *old
$1 = {buf = 0x7fb3010403e0 "", pc = 0x7fb3010403e0 "", limit = 0x7fb3010403e0 "", bufEnd = 0x7fb30104049c "", bufSize = 188, xid = 0, share_xid = 0, screen = 0, 
  psc = 0x0, imported = 0 '\000', currentContextTag = 0, renderMode = 0, feedbackBuf = 0x0, selectBuf = 0x0, fastImageUnpack = 0 '\000', fillImage = 0, 
  attributes = {stack = {0x0 <repeats 16 times>}, stackPointer = 0x0}, error = 0, isDirect = 0, currentDpy = 0x0, currentDrawable = 0, vendor = 0x0, 
  renderer = 0x0, version = 0x0, extensions = 0x0, maxSmallRenderCommandSize = 0, majorOpcode = 0, config = 0x0, currentReadable = 0, client_state_private = 0x0, 
  renderType = 0, server_major = 0, server_minor = 0, thread_id = 0, gl_extension_bits = '\000' <repeats 16 times>, vtable = 0x0}

(old->psc is NULL). direct rendering contexts are fine.
Comment 1 Kristian Høgsberg 2010-07-29 15:46:22 UTC
Should be fixed by:

commit b174710560c8e3909b5529d53b0c17a96ef0712d
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Jul 29 18:44:26 2010 -0400

    glx: Compare old ctx against dummyCtx, not NULL
    
    https://bugs.freedesktop.org/show_bug.cgi?id=29302


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.