Bug 19625 - Instead of returning and error, glXMakeContextCurrent crashes
Summary: Instead of returning and error, glXMakeContextCurrent crashes
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL: https://bugzilla.novell.com/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-16 16:58 UTC by Ian Romanick
Modified: 2009-08-24 12:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Generate an error if either the read or draw drawables are not GLXWindow (2.33 KB, patch)
2009-01-16 17:25 UTC, Ian Romanick
Details | Splinter Review

Description Ian Romanick 2009-01-16 16:58:21 UTC
When called with a valid Window ID that is not a valid GLXWindow (i.e., created by glXCreateWindow), glXMakeContextCurrent calls into the DRI driver and merrily crashes.
Comment 1 Ian Romanick 2009-01-16 17:25:28 UTC
Created attachment 22045 [details] [review]
Generate an error if either the read or draw drawables are not GLXWindow

Proposed fix.  It turns out there was another bug in that code.  GLX_ALIAS can only be used if the two functions are EXACT aliases.  However, MakeContextCurrent and glXMakeContextCurrent have different sets of parameters!

The only part of this that I'm unsure of is generating the X error.  We only do that in one or two other places for direct rendering, but it seems like we should do it everywhere.  Opinions?
Comment 2 Shunichi Fuji 2009-01-17 13:35:11 UTC
dups or deps to
http://bugs.freedesktop.org/show_bug.cgi?id=18367
Comment 3 Ian Romanick 2009-01-18 12:52:10 UTC
(In reply to comment #2)
> dups or deps to
> http://bugs.freedesktop.org/show_bug.cgi?id=18367
> 

I posted a reply to that bug.  I don't think it's a dup.  There's something else weird going on there.
Comment 4 Ian Romanick 2009-01-20 14:02:55 UTC
Fixed by commit ab9b4e1f593b2006a61c0f5440c2d7d3af80ea74.
Comment 5 Adam Jackson 2009-08-24 12:31:42 UTC
Mass version move, cvs -> git


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.