Bug 71502 - xcb_ge_event_t change causes API breakage
Summary: xcb_ge_event_t change causes API breakage
Status: RESOLVED FIXED
Alias: None
Product: XCB
Classification: Unclassified
Component: Library (show other bugs)
Version: 1.9.3
Hardware: All All
: medium critical
Assignee: Keith Packard
QA Contact: xcb mailing list dummy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: xcb-1.10
  Show dependency treegraph
 
Reported: 2013-11-11 15:41 UTC by Andrea Scarpino
Modified: 2013-12-21 13:58 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Andrea Scarpino 2013-11-11 15:41:54 UTC
By removing/replacing xcb_ge_event_t seems you break source/binary compatibility.

For example Qt5 apps crash and Qt5 cannot be built with libxcb 1.9.2/1.9.3, see https://bugreports.qt-project.org/browse/QTBUG-34748 for more info.
Comment 1 Uli Schlachter 2013-11-11 16:18:06 UTC
Previous version of the struct:

typedef struct {
    uint8_t  response_type;  /**< Type of the response */
    uint8_t  pad0;           /**< Padding */
    uint16_t sequence;       /**< Sequence number */
    uint32_t length;
    uint16_t event_type;
    uint16_t pad1;
    uint32_t pad[5];         /**< Padding */
    uint32_t full_sequence;  /**< full sequence */
} xcb_ge_event_t;

New version of it:

typedef struct xcb_ge_event_t {
    uint8_t  response_type; /**<  */
    uint8_t  extension; /**<  */
    uint16_t sequence; /**<  */
    uint32_t length; /**<  */
    uint16_t event_type; /**<  */
    uint8_t  pad0[22]; /**<  */
    uint32_t full_sequence; /**<  */
} xcb_ge_event_t;

So changes are:
- "pad0" became "extension"
- "pad1" and "pad" became "pad0"

(It looks like full_sequence still is in the same position, but that wasn't obvious to me)
Comment 2 Uli Schlachter 2013-11-18 19:51:48 UTC
Update:
- This bug is only about API compatibility, the ABI breakage is tracked in bug 71507.
- There is a patch on the mailing list: 
http://lists.freedesktop.org/archives/xcb/2013-November/008873.html (Let's see what the replies say and where this sub-thread leads to)
Comment 3 Uli Schlachter 2013-12-21 13:58:15 UTC
commit ce5395eb4611341ba7c243ed524d023a616f73bb
Author: Uli Schlachter <psychon@znc.in>
Date:   Mon Nov 18 20:30:18 2013 +0100

    Revert "Remove xcb_ge_event_t from xcb.h"
    
    This reverts commit f4d5b84800f960831e4fbb3ad9848bbb701020be.
    
    The version of this struct that the code generator produces breaks the API,
    because it gives the fields different (albeit better) names. Thus, we need to
    restore the old version of this struct.
    
    Additionally to the revert, this struct is documented as being deprecated. The
    replacement was added to xcb-proto.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71502
    Signed-off-by: Uli Schlachter <psychon@znc.in>
    Signed-off-by: Julien Cristau <jcristau@debian.org>


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.