bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56553: 29.0.50; ASAN error with fringe bitmaps on NS


From: Eli Zaretskii
Subject: bug#56553: 29.0.50; ASAN error with fringe bitmaps on NS
Date: Thu, 14 Jul 2022 19:55:41 +0300

> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Date: Thu, 14 Jul 2022 16:34:05 +0200
> Cc: 56553@debbugs.gnu.org
> 
> 
>  On 2022-07-14,, at 16:18 , Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
> 
>  frame #5: 0x000000010116d2b4 emacs`ns_define_fringe_bitmap(which=27,
>  bits=0x00000001066e1860, h=12, w=16) at nsterm.m:2906:20
>  2903  /* XBM rows are always round numbers of bytes, with any unused
>  2904  bits ignored. */
>  2905  int byte = y * (w/8 + (w%8 ? 1 : 0)) + x/8;
>  -> 2906  bool bit = 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?

Do you understand what that loop is trying to do?  What is this line
about:

        if (bit)
          [p appendBezierPathWithRect:NSMakeRect (x, y, 1, 1)];

Anyway, it sounds like you are saying that the code wants to access
the individual bytes of the 'short' elements?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]