From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#37415: Asserting failure setting frame parameters to non-fixnum values in early-init.el Date: Sat, 21 Sep 2019 12:02:51 +0200 Message-ID: References: <83v9tqvrm7.fsf@gnu.org> <9aae1b2e-bb5f-8634-5501-9aaff9f51266@gmx.at> <83imppvl9r.fsf@gnu.org> <14d4a455-254e-fdc2-0b64-791cfb0f7724@gmx.at> <83o8zgtlvq.fsf@gnu.org> <0936d492-c2bc-d4d3-7fcf-272d0fdbe087@gmx.at> <83a7ayss4b.fsf@gnu.org> <7b896377-d546-b428-adba-797ec988c4fa@gmx.at> <83r24aqadz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000567dfa05930d4c1e" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="56814"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37415@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 21 12:04:13 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iBcFQ-000EfO-VN for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Sep 2019 12:04:13 +0200 Original-Received: from localhost ([::1]:40642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBcFP-0000wB-P2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Sep 2019 06:04:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44125) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBcFH-0000vr-5v for bug-gnu-emacs@gnu.org; Sat, 21 Sep 2019 06:04:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBcFG-0007BL-0z for bug-gnu-emacs@gnu.org; Sat, 21 Sep 2019 06:04:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50368) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBcFF-0007BG-UC for bug-gnu-emacs@gnu.org; Sat, 21 Sep 2019 06:04:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iBcFF-0001Sb-Nn for bug-gnu-emacs@gnu.org; Sat, 21 Sep 2019 06:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Sep 2019 10:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37415 X-GNU-PR-Package: emacs Original-Received: via spool by 37415-submit@debbugs.gnu.org id=B37415.15690602165576 (code B ref 37415); Sat, 21 Sep 2019 10:04:01 +0000 Original-Received: (at 37415) by debbugs.gnu.org; 21 Sep 2019 10:03:36 +0000 Original-Received: from localhost ([127.0.0.1]:59189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBcEp-0001Rs-Ix for submit@debbugs.gnu.org; Sat, 21 Sep 2019 06:03:35 -0400 Original-Received: from mail-qk1-f171.google.com ([209.85.222.171]:35962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBcEn-0001Rf-Q0 for 37415@debbugs.gnu.org; Sat, 21 Sep 2019 06:03:34 -0400 Original-Received: by mail-qk1-f171.google.com with SMTP id y189so10012696qkc.3 for <37415@debbugs.gnu.org>; Sat, 21 Sep 2019 03:03:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IDJEmlmxbUU4KXHoVuJ9X2KAG5cjhQ3ZGY5xIudsi3Y=; b=B8GBpN3re6Orx7K9oDXQ+mIwgwN2cIW6QFiVl9Aqil3zBYMZFNDqEMX1YWV8+JsBB9 gKEJWKKfMLZPuovwAVodSeWKkR1ixyKAqooWsYgIN6QUO+VOup8nIQKx+6hdpOmUhGdq nzPt5oQuD0Z+zWlCzIqq63XrYER4LEAKIfVTowqgLlkSdtcikXDpo5jkXssl73gB/hsf mhT7EQIGiAaJkk0yzp3c22NbYUd+UyssB/67VCkVv6pGxP0MmnIA6ao387R3iPvfplqv TTLqWODNycB1pVhE/r7PD6ZC9pr0mI97tLZY5j5+/rp48YAkyyrqqmGQeIh8aP2b6c6e SCiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IDJEmlmxbUU4KXHoVuJ9X2KAG5cjhQ3ZGY5xIudsi3Y=; b=cr5UJ5qgSDl47j4YDY5rtX5pKed9Cl7o8KR08Yu7Im5NiPeX9Bg8mAV6gxNjwdZYKJ Nk6MuPs3uuE+uEeN95lIWWixg6XdrPpnEbchOta9fA9G+W0VzabkNsjZSM5GJEwLlxBs 8SxgP1W0rYNASegBvAvNFEP/ZvJHKScf46CJTziTvCXBeGjfUSNMqLkFnIzLapt0ORN7 K3JWZtPorbQRXdeyDExX+lLjJTHbNcHzCicdfzcjlCRvJY2f0Cgm9I19RxAUOoabacnA Mdk+heW/BdncBvtTt2Z+vuYdk8HKWxe7Mht/jvkjoJ3bKJ5i/XApYW0nLGgt+HhPkRfy BOsQ== X-Gm-Message-State: APjAAAVI2xNOpIf1RSC4l1YM+Lc9Ptnfio7zqEmrmJ9NIOyHfKf7jny+ 0D1OM27tjgHW+bFOSAaI4y+04p6RIevTWJS+S1k= X-Google-Smtp-Source: APXvYqz+cdElpsjyjfPwD37sxCKzsJOGtH6AtGKhPistSA8lZHi90atIPQhtXicg9rMW7OG02Bkf7hz4w+obMVXXS+Q= X-Received: by 2002:ae9:c219:: with SMTP id j25mr5955112qkg.277.1569060208146; Sat, 21 Sep 2019 03:03:28 -0700 (PDT) In-Reply-To: <83r24aqadz.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:166869 Archived-At: --000000000000567dfa05930d4c1e Content-Type: text/plain; charset="UTF-8" On Sat, Sep 21, 2019 at 11:14 AM Eli Zaretskii wrote: > . the FIXNUMP assertion is probably there for a reason; what is that > reason? Before 572fe798cd0a00ad4a9050a7962cf8e8fbcc209b (from 2014-09-30), the computation of left and top was done in w32_createwindow: /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero for anything that is not a number and is not Qunbound. */ left = x_get_arg (dpyinfo, Qnil, Qleft, "left", "Left", RES_TYPE_NUMBER); top = x_get_arg (dpyinfo, Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER); and anything not a number was turned to 0. In that commit you moved the code to my_create_window and used XINT: + /* When called with RES_TYPE_NUMBER, x_get_arg will return zero for + anything that is not a number and is not Qunbound. */ + left = x_get_arg (dpyinfo, Qnil, Qleft, "left", "Left", RES_TYPE_NUMBER); + top = x_get_arg (dpyinfo, Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER); + if (EQ (left, Qunbound)) + coords[0] = CW_USEDEFAULT; + else + coords[0] = XINT (left); + if (EQ (top, Qunbound)) + coords[1] = CW_USEDEFAULT; + else + coords[1] = XINT (top); + and these XINTs were transformed into XFIXNUM (which easserts) as part of a big XFIXNUM/XFIXNAT change (by Tom Tromey, in commit d1ec3a0a8e4d7d56ebc1e4fa743130b9974ac6a8 from 2018-08-07). So, from my ignorance, it seems like the idea was always to set non-nums to zero, and the assertion came by accident. Juanma --000000000000567dfa05930d4c1e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sat, Sep 21, 2019 at 11:14 AM Eli = Zaretskii <eliz@gnu.or= g> wrote:

> =C2=A0 = . the FIXNUMP assertion is probably there for a reason; what is that
>= ; =C2=A0 =C2=A0 reason?

Before=C2=A0572fe798cd0a00ad4a9050a7962cf8e8fbcc209b (fro= m 2014-09-30), the computation of left and top was done in w32_createwindow= :

=C2= =A0 =C2=A0 =C2=A0 /* When called with RES_TYPE_NUMBER, w32_get_arg will ret= urn zero
=C2=A0 =C2=A0 =C2=A0 =C2=A0 for anything that is not a number a= nd is not Qunbound. =C2=A0*/
=C2=A0 =C2=A0 =C2=A0 left =3D x_get_arg (dp= yinfo, Qnil, Qleft, "left", "Left", RES_TYPE_NUMBER);=C2=A0 =C2=A0 =C2=A0 top =3D x_get_arg (dpyinfo, Qnil, Qtop, "top&qu= ot;, "Top", RES_TYPE_NUMBER);

and anything not a number was turned = to 0.

= In that commit you moved the code to my_create_window and used XINT:
<= div class=3D"gmail_quote">
=C2=A0+ =C2= =A0/* When called with RES_TYPE_NUMBER, x_get_arg will return zero for
= =C2=A0+ =C2=A0 =C2=A0 anything that is not a number and is not Qunbound. = =C2=A0*/
=C2=A0+ =C2=A0left =3D x_get_arg (dpyinfo, Qnil, Qleft, "l= eft", "Left", RES_TYPE_NUMBER);
=C2=A0+ =C2=A0top =3D x_g= et_arg (dpyinfo, Qnil, Qtop, "top", "Top", RES_TYPE_NUM= BER);
=C2=A0+ =C2=A0if (EQ (left, Qunbound))
=C2=A0+ =C2=A0 =C2=A0coo= rds[0] =3D CW_USEDEFAULT;
=C2=A0+ =C2=A0else
=C2=A0+ =C2=A0 =C2=A0coo= rds[0] =3D XINT (left);
=C2=A0+ =C2=A0if (EQ (top, Qunbound))
=C2=A0+= =C2=A0 =C2=A0coords[1] =3D CW_USEDEFAULT;
=C2=A0+ =C2=A0else
=C2=A0+= =C2=A0 =C2=A0coords[1] =3D XINT (top);
=C2=A0+

and these XINTs were trans= formed into XFIXNUM (which easserts) as part of a big XFIXNUM/XFIXNAT chang= e=C2=A0 (by Tom Tromey, in commit=C2=A0d1ec3a0a8e4d7d56ebc1e4fa743130b9974ac6a8 fro= m 2018-08-07).

So, from my ignorance, it seems like the idea was always to set no= n-nums to zero, and the assertion came by accident.

=C2=A0 =C2=A0 Juanma
--000000000000567dfa05930d4c1e--