From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 58113@debbugs.gnu.org
Subject: bug#58113: 29.0.50; [noverlay] Segmentation fault while building on macOS
Date: Wed, 28 Sep 2022 06:29:33 +0200 [thread overview]
Message-ID: <m2r0zwxgsy.fsf@Mini.fritz.box> (raw)
In-Reply-To: <83v8p8iwzq.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 27 Sep 2022 19:48:57 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> (lldb) p tree->size
>> (intmax_t) $0 = 26
>> (lldb) p &tree->null
>> (interval_node *) $1 = 0x0000600002c03f08
>> (lldb) p tree->root
>> (interval_node *) $2 = 0x0000600002c03f08
>
> What does tree->null represent? Does it represent an empty tree? If
> so, I guess tree->size is not maintained correctly?
I surmise it means the tree is empty.
The tree->null thing reminds me of the MEM_NIL I used in the red-black
tree in alloc.c. It is sort of a "trick" to make a red-black tree
implementation more "elegant". Although--one such node per tree looks a
bit odd to me. But what do I know.
I'll see if I can spot something obvious that goes wrong with the size.
Otherwiese, it would be good if someone who can build an Emacs from the
branch could write some more tests.
[ A more general question is why the existing red-black tree hasn't been
hoisted from alloc.c? Or even, why not use a ready-made interval tree
like the one in the Linux kernel, which is also an augmented rb-tree?
That would be much more confidence-inducing than this. ]
next prev parent reply other threads:[~2022-09-28 4:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 12:07 bug#58113: 29.0.50; [noverlay] Segmentation fault while building on macOS Gerd Möllmann
2022-09-27 12:23 ` Gerd Möllmann
2022-09-27 12:43 ` Gerd Möllmann
2022-09-27 16:48 ` Eli Zaretskii
2022-09-28 4:29 ` Gerd Möllmann [this message]
2022-09-28 6:17 ` Gerd Möllmann
2022-09-28 10:13 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2r0zwxgsy.fsf@Mini.fritz.box \
--to=gerd.moellmann@gmail.com \
--cc=58113@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.