From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#34051: 27.0.50; Emacs 27 from master segfaults Date: Tue, 15 Jan 2019 16:52:32 +0000 Message-ID: <20190115165232.GB31959@breton.holly.idiocy.org> References: <834ladg8dw.fsf@gnu.org> <87sgxxwtbs.fsf@frege.i-did-not-set--mail-host-address--so-tickle-me> <8336pxfwx1.fsf@gnu.org> <87pnt0x0r2.fsf@frege.i-did-not-set--mail-host-address--so-tickle-me> <83sgxweg26.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="BXVAT5kNtrzKuDFl" X-Trace: blaine.gmane.org 1547571439 21583 195.159.176.226 (15 Jan 2019 16:57:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2019 16:57:19 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Stefan Husmann , 34051@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 15 17:57:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjS1Z-0005Rm-L0 for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Jan 2019 17:57:13 +0100 Original-Received: from localhost ([127.0.0.1]:47498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjS3g-0004zr-OO for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Jan 2019 11:59:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjS0p-0002SX-G0 for bug-gnu-emacs@gnu.org; Tue, 15 Jan 2019 11:56:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjRxY-0004MX-NW for bug-gnu-emacs@gnu.org; Tue, 15 Jan 2019 11:53:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32799) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjRxV-0004HF-PN for bug-gnu-emacs@gnu.org; Tue, 15 Jan 2019 11:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gjRxV-0008Cc-JK for bug-gnu-emacs@gnu.org; Tue, 15 Jan 2019 11:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Jan 2019 16:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34051 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 34051-submit@debbugs.gnu.org id=B34051.154757116731510 (code B ref 34051); Tue, 15 Jan 2019 16:53:01 +0000 Original-Received: (at 34051) by debbugs.gnu.org; 15 Jan 2019 16:52:47 +0000 Original-Received: from localhost ([127.0.0.1]:60313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjRxG-0008C9-NA for submit@debbugs.gnu.org; Tue, 15 Jan 2019 11:52:47 -0500 Original-Received: from mail-wm1-f41.google.com ([209.85.128.41]:38287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjRxB-0008Bt-Ua for 34051@debbugs.gnu.org; Tue, 15 Jan 2019 11:52:42 -0500 Original-Received: by mail-wm1-f41.google.com with SMTP id m22so3956665wml.3 for <34051@debbugs.gnu.org>; Tue, 15 Jan 2019 08:52:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8d8IlfuIc3q5Wrj3HU57pdxB0fRl3CyRIy4d4Q5yUkk=; b=sKaeie7hAlKSZW/JpWasUi/20dNha8cymLdI4cWQtNZ+au/AunIVWsrL3D+ZWeA+Dh RAk9fHFYYD9P1qtamO5rYXEYcM3S/HUWekAqKrj0XoiZ9IxMdIlviIJhEan8LlxKA7OT 8hGYSapzZ58CyIDnJrn6WvOMobRGI2QoRkkmiQ9RHlDJ+uRzgXNP8CvRxzJgt09aLv8D iV+qq9CncVWf+mLhOj/UfcM0RC5FTyvN77V+KVRw0ba2DFKxPdW40615782C1m50PtS/ h5eLhz491GdZoYk+vxcfh9qJYRrMXfN034iK0ifss5S9EFWhysdLv87wDp1u8Y175v4v kKjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=8d8IlfuIc3q5Wrj3HU57pdxB0fRl3CyRIy4d4Q5yUkk=; b=i4yEIZAx3RZJyUOWAcwFa13BALLIaRqDcfD8xiPRjuCwAAL2hSdwZ1q1Sju/4AlXcx b4y9LqqWJd4WQCcjjEMuVGk+OT9Ar0AH7zaVnL4tlSsp3YPWOtBAavcWHj0sRLCGV9Z4 +tg0yqBIahgwMFkz8KegILW/TXKd6jIsiwOaWZHMh5Phwj1fFbICgtiLVJw7M96ffdAp TiCOqXXyvUCBFUfE/aMl7pmE3sFHaZxesR2g0PvZSDE0/9YTpinh+CmsB8Xw2R68rYka TmSHCalRmxF1o2D430kHvf3QCv9Etw9x/rvWxGOGFc+Bnu8xKh0nTLhiGwj99PF4sjzX YZLQ== X-Gm-Message-State: AJcUukcZHXEpV1nZDSje75hDxeDHKA9SVjAkqWws48Qy6P7Ci+Db8iM2 c1ElbSOs2F3J9Up7/ip+uR4= X-Google-Smtp-Source: ALg8bN4sOur5OnwI5X2xVrlamxucM+Xq/N/s5h2CCCGhbVFG1oqlG1gS51vcy7CUW5mBbd01MqZSLA== X-Received: by 2002:a1c:9dc4:: with SMTP id g187mr4204788wme.152.1547571155904; Tue, 15 Jan 2019 08:52:35 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-7146-f61c-f28a-7497.holly.idiocy.org. [2001:8b0:3f8:8129:7146:f61c:f28a:7497]) by smtp.gmail.com with ESMTPSA id o81sm54156512wmd.10.2019.01.15.08.52.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Jan 2019 08:52:34 -0800 (PST) Content-Disposition: inline In-Reply-To: <83sgxweg26.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154451 Archived-At: --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jan 13, 2019 at 05:24:33PM +0200, Eli Zaretskii wrote: > Strange, it looks like it dies in x_parse_color. Alan, can you > reproduce this? These X server errors are asynchronous and not very helpful. The most likely culprit is x_create_x_image_and_pixmap. Stefan, please try the attached patch. -- Alan Third --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Be-more-specific-with-XRender-bit-depths-bug-34051.patch" >From 254097a0aadb252f9223e1d133132a01b459bc7d Mon Sep 17 00:00:00 2001 From: Alan Third Date: Tue, 15 Jan 2019 16:38:34 +0000 Subject: [PATCH] Be more specific with XRender bit-depths (bug#34051) * src/image.c (x_create_x_image_and_pixmap): Fail gracefully if a bit depth is requested that XRender doesn't support. --- src/image.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/image.c b/src/image.c index 2fae105815..3f5def2350 100644 --- a/src/image.c +++ b/src/image.c @@ -2178,15 +2178,29 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth, int event_basep, error_basep; if (picture && XRenderQueryExtension (display, &event_basep, &error_basep)) { - XRenderPictFormat *format; - XRenderPictureAttributes attr; - - /* FIXME: Do we need to handle all possible bit depths? */ - format = XRenderFindStandardFormat (display, - depth > 24 ? PictStandardARGB32 - : depth > 8 ? PictStandardRGB24 - : PictStandardA8); - *picture = XRenderCreatePicture (display, *pixmap, format, 0, &attr); + if (depth == 32 || depth == 24 || depth == 8) + { + XRenderPictFormat *format; + XRenderPictureAttributes attr; + + /* FIXME: Do we need to handle all possible bit depths? + XRenderFindStandardFormat supports PictStandardARGB32, + PictStandardRGB24, PictStandardA8, PictStandardA4, + PictStandardA1, and PictStandardNUM (what is this?!). + + XRenderFindFormat may support more, but I don't + understand the documentation. */ + format = XRenderFindStandardFormat (display, + depth == 32 ? PictStandardARGB32 + : depth == 24 ? PictStandardRGB24 + : PictStandardA8); + *picture = XRenderCreatePicture (display, *pixmap, format, 0, &attr); + } + else + { + image_error ("Specified bit depth is not supported by XRender"); + *picture = NULL; + } } # endif -- 2.19.1 --BXVAT5kNtrzKuDFl--