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?