From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#56553: 29.0.50; ASAN error with fringe bitmaps on NS Date: Thu, 14 Jul 2022 16:34:05 +0200 Message-ID: <8569ECF9-6D19-4DCB-854C-2755D182F8AF@gmail.com> References: <83cze7u7b7.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_E8FC19AA-0912-4F5E-B07E-CA606A031BC3" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12224"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56553@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 14 16:35:20 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBzvu-0002nz-4S for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 16:35:14 +0200 Original-Received: from localhost ([::1]:40032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBzvs-0000xr-RG for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 10:35:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBzvj-0000xf-08 for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 10:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40804) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBzvi-0000gS-NX for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 10:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oBzvi-0003k7-I4 for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 10:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2022 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56553 X-GNU-PR-Package: emacs Original-Received: via spool by 56553-submit@debbugs.gnu.org id=B56553.165780925614326 (code B ref 56553); Thu, 14 Jul 2022 14:35:02 +0000 Original-Received: (at 56553) by debbugs.gnu.org; 14 Jul 2022 14:34:16 +0000 Original-Received: from localhost ([127.0.0.1]:38563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBzuy-0003iz-39 for submit@debbugs.gnu.org; Thu, 14 Jul 2022 10:34:16 -0400 Original-Received: from mail-wm1-f53.google.com ([209.85.128.53]:35732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBzuv-0003il-Rx for 56553@debbugs.gnu.org; Thu, 14 Jul 2022 10:34:14 -0400 Original-Received: by mail-wm1-f53.google.com with SMTP id v67-20020a1cac46000000b003a1888b9d36so3214715wme.0 for <56553@debbugs.gnu.org>; Thu, 14 Jul 2022 07:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=OwQOQZNKl4AtDL/7YVFJ3E56JNjlSsARYvDY5lxAgTo=; b=RdMlKFebibb4cd5Mgo80ayq+yfo6CsU3l5qCeNFfB7PGsaDW3WOAJtRmD2ZqXB8UQB USoEmepvJHuJMAtIA2/stRkIRzOt4yTbWBjWyGhR5LxRKaqBI0jcz8nHIphgfJvFi4rC X2flIWdRg2/Fl1HefbqfwCw2LEapl42DuKezg3IIcQHhUIkrPXZhPddf8ClqS63mJGw2 sIqe8MyLvrOWOUmfOYHogdgGtz3vw1u+X0S9REedu26FFKSBiwBrzUsd4b0RRy7ct+yK YvQgJ1R3Iwwl70ksncKepLDX2gwBJlEEJIDQ8AGR3zafpYMswbFK0gT/6ITHwxSAxEut FGCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=OwQOQZNKl4AtDL/7YVFJ3E56JNjlSsARYvDY5lxAgTo=; b=j+8mcgNhHdulPAk7DMO6BIwdv5rLnENDkZeO4FLLHeooD9EbdB88sOwMcjs7ooItXq R3bkjGCjdpwCGwYqtt39KtpITmsMPrWFhijCKZMziq1x/gHx1UXW8DUsYHywn/FsrvuF kGFDbB95+1Jsncoo7iOnYjdoqx3ItIDgMXvJvPm7OlJeDbSSjVbDWhr12OPMFNZgnXD0 v1TSJuKx2bp66py88QL8PQbxg52vetE1VWA9WIJT+S+f/zSNItgReMazErVjjnw/Kjp6 aVDMSUKbQlBPKyToVfAK9dbLd0eUttDUpryLqkaV8NGPNjuUOSsuyqFiAQVNPJhp4115 DFWA== X-Gm-Message-State: AJIora9jE+VQ6XYSVNjAmT5X/1U/1r6dcC44rxJQPjEmLs0dJjnkQvil vkK/l2+Y3Or10E3/j5w07z2ErNiLGKE8iA== X-Google-Smtp-Source: AGRyM1tH5dU47VW5d89RX2oYVUaxt546vhyVY4T8dgNsySpPZvqVWDLCeZjxI1lEjHgBfa69IzaFIw== X-Received: by 2002:a7b:c8d1:0:b0:3a2:e502:79c0 with SMTP id f17-20020a7bc8d1000000b003a2e50279c0mr9456269wml.196.1657809246670; Thu, 14 Jul 2022 07:34:06 -0700 (PDT) Original-Received: from smtpclient.apple (pd9e365de.dip0.t-ipconnect.de. [217.227.101.222]) by smtp.gmail.com with ESMTPSA id bl19-20020adfe253000000b0021d7f032022sm1596931wrb.17.2022.07.14.07.34.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2022 07:34:06 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3696.100.31) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237000 Archived-At: --Apple-Mail=_E8FC19AA-0912-4F5E-B07E-CA606A031BC3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 2022-07-14,, at 16:18 , Gerd M=C3=B6llmann = wrote: >>>=20 >>> frame #5: 0x000000010116d2b4 emacs`ns_define_fringe_bitmap(which=3D27,= bits=3D0x00000001066e1860, h=3D12, w=3D16) at nsterm.m:2906:20 >>> 2903 /* XBM rows are always round numbers of bytes, with any = unused >>> 2904 bits ignored. */ >>> 2905 int byte =3D y * (w/8 + (w%8 ? 1 : 0)) + x/8; >>> -> 2906 bool bit =3D bits[byte] & (0x80 >> x%8); I think the problem is indeed that bits is unsigned short*. Otherwise, = the /8 and %8 in line 2903 don't make sense to me. I think "byte" = computes an index in a byte (char) array. WDYT? --Apple-Mail=_E8FC19AA-0912-4F5E-B07E-CA606A031BC3 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On 2022-07-14,, at 16:18 , Gerd M=C3=B6llmann <gerd.moellmann@gmail.com> wrote:

frame #5: = 0x000000010116d2b4 emacs`ns_define_fringe_bitmap(which=3D27, = bits=3D0x00000001066e1860, h=3D12, w=3D16) at nsterm.m:2906:20
2903  /* XBM = rows are always round numbers of bytes, with any unused
2904  bits = ignored. */
2905  int byte =3D y * (w/8 + = (w%8 ? 1 : 0)) + x/8;
-> 2906  bool bit =3D bits[byte] = & (0x80 >> x%8);

I think the problem is indeed that bits is = unsigned short*.  Otherwise, the /8 and %8 in line 2903 don't make = sense to me.  I think "byte" computes an index in a byte (char) = array.

WDYT?

= --Apple-Mail=_E8FC19AA-0912-4F5E-B07E-CA606A031BC3--