emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XCB and 32- vs 64-bit 'long'


From: Paul Eggert
Subject: XCB and 32- vs 64-bit 'long'
Date: Fri, 13 Nov 2015 10:05:41 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Valgrind pointed out a bug in recent XCB-related changes, in that Xlib converts 32-bit quantities to 'long' but XCB does not. The distinction matters on platforms like x86-64 where 'long' is 64 bits. Also, on my platform at least, xcb_get_property_value_length returns a byte count, not a word count; unfortunately this does not appear to be documented anywhere.

I just now installed a patch that I hope fixes this:

http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4c4b520520cf6b99ce7128331a4e108e58095705

Ken, could you please check this patch? I am by no means an expert in XCB. Thanks.

While we're on the subject, I assume that the goal is to replace all Xlib calls with XCB calls, on platforms that have XCB. Can Emacs start assuming XCB, and drop the old Xlib-only code? That would simplify Emacs maintenance.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]