GNU bug report logs - #21152
emacs make system blocked if "Xft/DPI = -1" in xsettings

Previous Next

Package: emacs;

Reported by: Xu Fasheng <fasheng.xu <at> gmail.com>

Date: Tue, 28 Jul 2015 15:33:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#21152: closed (emacs make system blocked if "Xft/DPI = -1" in
 xsettings)
Date: Mon, 10 Aug 2015 06:25:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 09 Aug 2015 23:24:52 -0700
with message-id <55C843B4.30601 <at> cs.ucla.edu>
and subject line Re: bug#21152: emacs make system blocked if "Xft/DPI = -1" in xsettings
has caused the debbugs.gnu.org bug report #21152,
regarding emacs make system blocked if "Xft/DPI = -1" in xsettings
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
21152: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21152
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Xu Fasheng <fasheng.xu <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: emacs make system blocked if "Xft/DPI = -1" in xsettings
Date: Tue, 28 Jul 2015 13:58:28 +0800
Hi, everyone.

I found that emacs could not compute a right dpi value if "Xft/DPI =
-1" in xsettings. The document said "Xft/DPI" is an integer, and "-1"
is the default value [1].

And in the code of src/xsettings.c:parse_settings(), all the interger
value in xsettings are converted to CARD32(unsigned int). So if
Xft/DPI is "-1", emacs will convert it to uint(4294967295), and owns a
huge dpi(4294967295/1024=4194303). Its so huge that will make system
blocked.

Here is the code snippets in
emacs24-24.5+1/src/xsettings.c:parse_settings() from debian/sid:
    ....
    420: CARD32 vlen, ival = 0;
    ....
    544: else if (strcmp (name, "Xft/DPI") == 0)
    545:  {
    546:    settings->seen |= SEEN_DPI;
    547:    settings->dpi = (double)ival/1024.0;
    548:  }

[1] http://www.freedesktop.org/wiki/Specifications/XSettingsRegistry/


[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Xu Fasheng <fasheng.xu <at> gmail.com>
Cc: 21152-done <at> debbugs.gnu.org
Subject: Re: bug#21152: emacs make system blocked if "Xft/DPI = -1" in
 xsettings
Date: Sun, 09 Aug 2015 23:24:52 -0700
Xu Fasheng wrote:
> tha patch works. I rebuild emacs and tested ok.

Thanks, I installed it in the Emacs master and am marking this as done.



This bug report was last modified 9 years and 288 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.