From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#35814: 27.0.50; Broken font display Date: Tue, 21 May 2019 20:14:17 +0100 Message-ID: References: <87d0kcvmj0.fsf@mail.linkov.net> <87ef4suz0c.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="48628"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.50 (windows-nt) To: 35814@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 21 21:15:14 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 esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTAEC-000CWJ-IA for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 May 2019 21:15:12 +0200 Original-Received: from localhost ([127.0.0.1]:58180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTAEB-0007Fl-9E for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 May 2019 15:15:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTAE4-0007FJ-01 for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 15:15:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTAE3-00074S-5D for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 15:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55673) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTAE2-000742-Pi for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 15:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hTAE2-0008SW-Kf for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 15:15:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87d0kcvmj0.fsf@mail.linkov.net> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 May 2019 19:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35814 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.155846608332469 (code B ref -1); Tue, 21 May 2019 19:15:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 May 2019 19:14:43 +0000 Original-Received: from localhost ([127.0.0.1]:40984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTADi-0008Rd-LZ for submit@debbugs.gnu.org; Tue, 21 May 2019 15:14:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTADg-0008RO-DF for submit@debbugs.gnu.org; Tue, 21 May 2019 15:14:40 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47165) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hTADb-0006oU-An for submit@debbugs.gnu.org; Tue, 21 May 2019 15:14:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTADa-0007Ek-9L for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 15:14:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTADW-0006je-9g for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 15:14:33 -0400 Original-Received: from [195.159.176.226] (port=41552 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hTADU-0006fF-5P for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 15:14:28 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hTADP-000Ba1-OB for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 21:14:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:u8P3808fYRHaYfPHeHFS2iE2Y/8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:159615 Archived-At: On Tue 21 May 2019, Alex Gramiak wrote: > Juri Linkov writes: > >> Some yesterday's commit in master broke the display of the text that uses >> the font "-misc-fixed-medium-r-normal--10-*-*-*-c-60-iso10646-*" >> in GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) >> Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 >> System Description: Linux Mint 19 >> >> Screenshot: > > It's probably due to my a4fe9c70af7 commit, sorry. > > I tested with all X font backends -- what's the value of > (frame-parameter nil 'font-backend) normally? > > And is it only that font, or other fonts as well? Alex, at the end of xfont_draw() in xfont.c, we now have: else { const unsigned code = s->char2b[from]; const XChar2b char2b = { .byte1 = code >> 8, .byte2 = code & 0xFF }; XDrawImageString16 (display, FRAME_X_DRAWABLE (s->f), gc, x, y, &char2b, len); } and: else { const unsigned code = s->char2b[from]; const XChar2b char2b = { .byte1 = code >> 8, .byte2 = code & 0xFF }; XDrawString16 (display, FRAME_X_DRAWABLE (s->f), gc, x, y, &char2b, len); } Both of these pass "len", but use a single XChar2b on the stack, so this causes an overrun (and draws random stack contents). AndyM