Bug 60984

Summary: remove special case for length calculation - GLX: GetFBConfigs()
Product: XCB Reporter: Daniel Martin <consume.noise>
Component: LibraryAssignee: xcb mailing list dummy <xcb>
Status: RESOLVED WONTFIX QA Contact: xcb mailing list dummy <xcb>
Severity: trivial    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Daniel Martin 2013-02-17 02:51:00 UTC
In libxcb read_packet() there's a special case to fix the length of a GLX GetFBConfigs reply:
http://cgit.freedesktop.org/xcb/libxcb/tree/src/xcb_in.c#n160

This special case was necessary for "X.org servers before 6.9":
http://cgit.freedesktop.org/xcb/proto/tree/src/glx.xml#n30

Version 6.9 was released in December 2005. So, the bug was fixed 8 years ago. A server with that bug would be much older. Can't we assume that anyone using a current libxcb has at least a server of version 6.9 and remove the special case?
Comment 1 Uli Schlachter 2013-02-17 09:10:09 UTC
I know next to nothing about this bug, but why do you want to remove this special case?

If it doesn't break anything then why should this work-around be removed? After all, someone might still need it.
Comment 2 Daniel Martin 2013-02-17 14:13:41 UTC
It's a habbit of mine: trying to keep code clean and remove old (special) code.

And a workaround for a bug which was fixed ~7 years ago definitly got my attention. Sure, it doesn't hurt to keep it. But, I think it won't hurt either if we remove it.

Haven't had looked at xpyb or xgb if they've this workaround too.
Comment 3 Andrew Gallant 2013-02-17 16:24:54 UTC
> Haven't had looked at xpyb or xgb if they've this workaround too.

FWIW, I don't think the GLX extension even works in XGB (although it compiles). I certainly didn't add any workarounds to fix ~7 year old bugs :-)

- Andrew
Comment 4 Josh Triplett 2013-02-18 06:10:54 UTC
> And a workaround for a bug which was fixed ~7 years ago definitly got my attention.

You need to recalibrate your compatibility timescales to deal with X. :)

Removing a workaround for a real bug breaks compatibility with those older X servers, and that doesn't seem worth doing just to reduce code size a tiny bit.  Unless you can show some real problem with retaining this code, I think we should keep this workaround indefinitely.

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.