From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: XCB and 32- vs 64-bit 'long' Date: Fri, 13 Nov 2015 10:05:41 -0800 Organization: UCLA Computer Science Department Message-ID: <56462675.80908@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1447437981 7790 80.91.229.3 (13 Nov 2015 18:06:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Nov 2015 18:06:21 +0000 (UTC) Cc: Emacs development discussions To: Ken Raeburn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 13 19:06:06 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZxIjc-00074H-Pb for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2015 19:06:04 +0100 Original-Received: from localhost ([::1]:54539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxIjc-0002F5-4A for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2015 13:06:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxIjO-0002Eo-1v for emacs-devel@gnu.org; Fri, 13 Nov 2015 13:05:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxIjK-00039t-09 for emacs-devel@gnu.org; Fri, 13 Nov 2015 13:05:49 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxIjJ-00039j-QD for emacs-devel@gnu.org; Fri, 13 Nov 2015 13:05:45 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E9475160779; Fri, 13 Nov 2015 10:05:44 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id eZxBwIaEVjZo; Fri, 13 Nov 2015 10:05:43 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5E2D3160E5E; Fri, 13 Nov 2015 10:05:43 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JlAz5h8Qd5zZ; Fri, 13 Nov 2015 10:05:43 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 46C6A160779; Fri, 13 Nov 2015 10:05:43 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194394 Archived-At: 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.