Subject: Re: bug#58113: 29.0.50; [noverlay] Segmentation fault while building on macOS

From: Gerd Möllmann <[email-masked]>
Date: Tue, 27 Sep 2022 14:43:40 +0200

Gerd Möllmann <[email-masked]> writes:

With --enable-checking:

itree.c:389: Emacs fatal error: assertion failed: tree->size == 0 || (tree->size > 0 && tree->root != &tree->null)
/bin/sh: line 1:  2779 Abort trap: 6           '../src/emacs' -batch --no-site-file --no-site-lisp --eval "(setq load-prefer-newer t byte-compile-warnings 'all)" -f batch-byte-compile cedet/srecode/cpp.el
make[3]: *** [cedet/srecode/cpp.elc] Error 134
make[3]: *** Waiting for unfinished jobs....

frame #5: 0x00000001003a2814 emacs`interval_tree_remove(tree=0x0000600002c03f00, node=0x0000600002112b70) at itree.c:389:3
   386 	  node->right = node->left = node->parent = NULL;
   387 	  --tree->size;
   388 	
-> 389 	  eassert (tree->size == 0 || (tree->size > 0 && tree->root != &tree->null));
   390 	
   391 	  return node;
   392 	}
(lldb) p tree->size
(intmax_t) $0 = 26
(lldb) p &tree->null
(interval_node *) $1 = 0x0000600002c03f08
(lldb) p tree->root
(interval_node *) $2 = 0x0000600002c03f08

(lldb) xbacktrace
(unsigned char *) data = 0x000000010048e3cf "delete-overlay"
(unsigned char *) data = 0x0000000103d5e158 "semantic-edits-flush-changes"
(unsigned char *) data = 0x000000010049aa58 "run-hooks"
(unsigned char *) data = 0x0000000103c573a0 "semantic-clear-toplevel-cache"
(unsigned char *) data = 0x0000000103c59048 "semantic-new-buffer-fcn"
(unsigned char *) data = 0x000000010049aea7 "let"
(unsigned char *) data = 0x000000010049add7 "if"
(unsigned char *) data = 0x0000000100498142 "save-excursion"
(unsigned char *) data = 0x000000010049aea7 "let"
(unsigned char *) data = 0x000000010049add7 "if"
(unsigned char *) data = 0x0000000103b6b8a8 "srecode-map-validate-file-for-mode"
(unsigned char *) data = 0x000000010049aea7 "let"
(unsigned char *) data = 0x000000010049addf "progn"
(unsigned char *) data = 0x000000010049add7 "if"
(unsigned char *) data = 0x000000010049aea7 "let"
(unsigned char *) data = 0x000000010049aeb0 "while"
(unsigned char *) data = 0x000000010049aea7 "let"
(unsigned char *) data = 0x000000010049addf "progn"
(unsigned char *) data = 0x000000010049add7 "if"
(unsigned char *) data = 0x000000010049aea7 "let"
(unsigned char *) data = 0x000000010049aeb0 "while"
(unsigned char *) data = 0x000000010049aea7 "let"
(unsigned char *) data = 0x000000010049aea7 "let"
(unsigned char *) data = 0x0000000103b6b380 "srecode-map-update-map"
(unsigned char *) data = 0x0000000103b6ba60 "srecode-map-load-path-set"
(unsigned char *) data = 0x0000000104b932b9 "custom-initialize-reset"
(unsigned char *) data = 0x0000000104ba7bca "custom-declare-variable"
(unsigned char *) data = 0x00000001004a69be "eval-buffer"
(unsigned char *) data = 0x0000000104b7d1cb "load-with-code-conversion"
(unsigned char *) data = 0x000000010049ca11 "require"
(unsigned char *) data = 0x00000001004a69be "eval-buffer"
(unsigned char *) data = 0x0000000104b7d1cb "load-with-code-conversion"
(unsigned char *) data = 0x000000010049ca11 "require"
(unsigned char *) data = 0x00000001004a69be "eval-buffer"
(unsigned char *) data = 0x0000000104b7d1cb "load-with-code-conversion"
(unsigned char *) data = 0x000000010049ca11 "require"
(unsigned char *) data = 0x00000001004a69be "eval-buffer"
(unsigned char *) data = 0x0000000104b7d1cb "load-with-code-conversion"
(unsigned char *) data = 0x000000010049ca11 "require"
(unsigned char *) data = 0x000000010049af38 "apply"
(unsigned char *) data = 0x00000001038e3ff0 "byte-compile-file-form-require"
(unsigned char *) data = 0x00000001038e3dc8 "byte-compile-file-form"
PVEC_COMPILED
(unsigned char *) data = 0x000000010389e6d8 "byte-compile-recurse-toplevel"
(unsigned char *) data = 0x00000001038e3a18 "byte-compile-toplevel-file-form"
PVEC_COMPILED
(unsigned char *) data = 0x00000001038e3700 "byte-compile-from-buffer"
(unsigned char *) data = 0x0000000104bab922 "byte-compile-file"
(unsigned char *) data = 0x00000001038dc2e8 "batch-byte-compile-file"
(unsigned char *) data = 0x0000000104c1b209 "batch-byte-compile"