Subject: 28.0.50; Assertation failed when built with checking and mouse face is set to :box 0

From: Po Lu <[email-masked]>
Date: Mon, 20 Sep 2021 19:29:43 +0800

When I set the box of the mouse face on a section of text to 0, such as
with (insert (propertize "abc" foo 'mouse-face '(:box 0))), and move the
mouse over that, and I build with enable-checking, Emacs crashes with:

xfaces.c:5976: Emacs fatal error: assertion failed: XFIXNUM (box) != 0
Fatal error 6: Aborted

In GNU Emacs 28.0.50 (build 57, i386-pc-solaris2.11, X toolkit, Xaw scroll bars)
 of 2021-09-19 built on beached-whale
Repository revision: bc59c98f096f7d01cbccf98d4fdd9c3f0385e896 (please
 ignore this, I reproduced the bug on latest master)
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12101002
Configured using:
 'configure --with-gnutls=ifavailable --disable-acl'

Configured features:
GIF JPEG MODULES PDUMPER PNG THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE
XIM XPM LUCID ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
mule-util rect cus-start cus-load pixel-scroll smerge-mode diff
whitespace term disp-table ehelp pulse color vc-mtn vc-hg vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs thingatpt etags fileloop generator xref
project noutline outline dired-aux dired dired-loaddefs cl-extra
help-mode tabify imenu man time-date shell pcomplete compile
text-property-search gdb-mi gud comint ansi-color ring misearch
multi-isearch vc-git diff-mode easy-mmode vc vc-dispatcher bug-reference
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs edmacro kmacro sly-autoloads info package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads
dynamic-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 8 319550 36788)
 (symbols 24 15660 1)
 (strings 16 56375 3223)
 (string-bytes 1 2028150)
 (vectors 8 30879)
 (vector-slots 4 461927 37450)
 (floats 8 160 205)
 (intervals 28 45544 746)
 (buffers 564 43))