unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 56553@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#56553: 29.0.50; ASAN error with fringe bitmaps on NS
Date: Fri, 15 Jul 2022 16:23:09 +0800	[thread overview]
Message-ID: <87cze6okcy.fsf@yahoo.com> (raw)
In-Reply-To: <EB2520AC-B77A-4682-BE2A-922FCD2597FA@gmail.com> ("Gerd Möllmann"'s message of "Thu, 14 Jul 2022 20:25:25 +0200")

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> If we insert the max values for x, y, w, h in the original, we have
>
>    int byte = (12 - 1) * (16/8 + (16%8 != 0 ? 1 : 0) + (16 - 1)/8
>
> which is 
>
>                 = 11 * (2 + (0 ? 1 : 0) + 15/8
>                 = 11 * 2 + 1
> 		= 23
>
> which would be the right /byte/ to access in the bitmap.  But
> "bits[byte]" doesn't access the 23rd byte of the bitmap but the 23rd
> unsigned short, which is byte 46 and 47.  That cannot possibly be
> right, or?

Yes, you're right here.  I think that code does want to access the
individual bytes.

> The NSBezierPath stuff I don't know.  I gather, from a short look at
> the docs, that one can "record" stuff that should be drawn in such an
> object.  The path can then later be used to actually draw.  Looks a
> tad complicated to me to draw single pixels as a rectangle of size 1,
> but what do I know...

Believe it or not, it's the only way to record such a pixel without
resulting in annoying scaling artifacts from the OS trying to scale the
image up to monitor resolution.





  reply	other threads:[~2022-07-15  8:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 13:03 bug#56553: 29.0.50; ASAN error with fringe bitmaps on NS Gerd Möllmann
2022-07-14 13:56 ` Eli Zaretskii
2022-07-14 14:18   ` Gerd Möllmann
2022-07-14 14:34     ` Gerd Möllmann
2022-07-14 16:55       ` Eli Zaretskii
2022-07-14 18:25         ` Gerd Möllmann
2022-07-15  8:23           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-07-15  9:14             ` Gerd Möllmann
2022-07-15 10:37               ` Eli Zaretskii
2022-07-15 13:55                 ` Gerd Möllmann
2022-07-15 13:57                   ` Robert Pluim
2022-07-15 14:26                     ` Eli Zaretskii
2022-07-15 14:46               ` Andreas Schwab
2022-07-15 15:10                 ` Gerd Möllmann
2022-07-15 15:16                   ` Gerd Möllmann
2022-07-16  7:16                     ` Gerd Möllmann
2022-07-15 15:32                   ` Andreas Schwab
2022-07-15 10:35             ` Eli Zaretskii
2022-07-15 10:37               ` Gerd Möllmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cze6okcy.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=56553@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).