From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Armstrong Newsgroups: gmane.emacs.bugs Subject: bug#59029: 29.0.50; noverlay: pdumper.c: dump_interval_node recursion has no base case Date: Sat, 05 Nov 2022 11:09:29 -0700 Message-ID: <87cza1w9wm.fsf@rfc20.org> References: <87leoqwc4o.fsf@rfc20.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6909"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 59029@debbugs.gnu.org, stefan monnier To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 05 19:10:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1orNcS-0001dq-0N for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Nov 2022 19:10:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orNcK-0007xB-G5; Sat, 05 Nov 2022 14:10:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orNcI-0007ww-EL for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 14:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1orNcH-0006aD-Sf for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 14:10:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1orNcH-0001oO-O9 for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2022 14:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Nov 2022 18:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59029 X-GNU-PR-Package: emacs Original-Received: via spool by 59029-submit@debbugs.gnu.org id=B59029.16676717826935 (code B ref 59029); Sat, 05 Nov 2022 18:10:01 +0000 Original-Received: (at 59029) by debbugs.gnu.org; 5 Nov 2022 18:09:42 +0000 Original-Received: from localhost ([127.0.0.1]:58009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orNbx-0001nl-Uu for submit@debbugs.gnu.org; Sat, 05 Nov 2022 14:09:42 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:43737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orNbv-0001nY-RS for 59029@debbugs.gnu.org; Sat, 05 Nov 2022 14:09:40 -0400 Original-Received: (Authenticated sender: matt@rfc20.org) by mail.gandi.net (Postfix) with ESMTPSA id B141AE0012; Sat, 5 Nov 2022 18:09:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1667671773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=U8uwAOw0FutMcHWwd3vPawsZ8z90Pm0lPQcCIdVcEqY=; b=IqUxkmDRqdEjcmRTpDrogBTUEAt5/ROVUVWc6wWKq0v5YD87pMB9I99fgjGAl3ExLsUzPm lL+iDLS3wSlOByp45huNNpUSzqpFiTt/vPObOvwIfBfzW8tja6DA9cTOOtgt9DEIemETME e0mHdPggyO3k2JIYyiIhkNGQphBb/+V9dNod7Ym10bFxppnWfDlG9rzAw26P4IVfBolP7N JM7xQD9CSTyxVNO5VauKnwaJLxzPecL7bNQQKLU0qPd8cKBDU4vLhMERddYRCVB4kOcmo3 b1UFf4wmRomDAjcNpIZ+nPkSV0y9Xss6zOXV/YirOKkPREm3Z2BHydRG7kg/uw== Original-Received: from matt by naz with local (Exim 4.96) (envelope-from ) id 1orNbl-0006Cm-34; Sat, 05 Nov 2022 11:09:29 -0700 In-Reply-To: ("Gerd =?UTF-8?Q?M=C3=B6llmann?="'s message of "Sat, 05 Nov 2022 06:41:41 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247150 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Gerd M=C3=B6llmann writes: > Yes, I think you are right. > > Could we also rename dump_interval_node to dump_itree_node? There is > another function dump_interval_tree for text properties, which is a bit > confusing. Attached renames the function and tags two related FIXMEs with this bug number. The root issue is that pdumping buffers with overlays is not implemented. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0005-Add-FIXME-comments-for-overlays.patch >From 82c448f7f6eda810114151b5339d500fd6cf5826 Mon Sep 17 00:00:00 2001 From: Matt Armstrong Date: Sat, 5 Nov 2022 11:03:09 -0700 Subject: [PATCH 5/5] Add FIXME comments for overlays. * src/pdumper.c (dump_itree_node): Renamed from dump_interval_node. Add FIXME(Matt): comment for bug#59029. (dump_buffer): Tag comment with FIXME bug#59029. --- src/pdumper.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/pdumper.c b/src/pdumper.c index 0a5d96dbb7c..10b6f58bbd8 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -2134,8 +2134,8 @@ dump_marker (struct dump_context *ctx, const struct Lisp_Marker *marker) } static dump_off -dump_interval_node (struct dump_context *ctx, struct itree_node *node, - dump_off parent_offset) +dump_itree_node (struct dump_context *ctx, struct itree_node *node, + dump_off parent_offset) { #if CHECK_STRUCTS && !defined (HASH_itree_node_50DE304F13) # error "itree_node changed. See CHECK_STRUCTS comment in config.h." @@ -2158,21 +2158,25 @@ dump_interval_node (struct dump_context *ctx, struct itree_node *node, DUMP_FIELD_COPY (&out, node, rear_advance); DUMP_FIELD_COPY (&out, node, front_advance); dump_off offset = dump_object_finish (ctx, &out, sizeof (out)); + /* FIXME: bug#59029 We haven't implemented the code to dump overlays + that are part of a buffer. The code below will recurse forever + if any of parent, left or right is non-NULL, but isn't worth + changing until we have a test case. */ if (node->parent) dump_remember_fixup_ptr_raw (ctx, offset + dump_offsetof (struct itree_node, parent), - dump_interval_node (ctx, node->parent, offset)); + dump_itree_node (ctx, node->parent, offset)); if (node->left) dump_remember_fixup_ptr_raw (ctx, offset + dump_offsetof (struct itree_node, left), - dump_interval_node (ctx, node->left, offset)); + dump_itree_node (ctx, node->left, offset)); if (node->right) dump_remember_fixup_ptr_raw (ctx, offset + dump_offsetof (struct itree_node, right), - dump_interval_node (ctx, node->right, offset)); + dump_itree_node (ctx, node->right, offset)); return offset; } @@ -2189,7 +2193,7 @@ dump_overlay (struct dump_context *ctx, const struct Lisp_Overlay *overlay) dump_remember_fixup_ptr_raw (ctx, offset + dump_offsetof (struct Lisp_Overlay, interval), - dump_interval_node (ctx, overlay->interval, offset)); + dump_itree_node (ctx, overlay->interval, offset)); return offset; } @@ -2864,7 +2868,8 @@ dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer) DUMP_FIELD_COPY (out, buffer, long_line_optimizations_p); if (buffer->overlays && buffer->overlays->root != NULL) - /* We haven't implemented the code to dump overlays. */ + /* FIXME: bug#59029 We haven't implemented the code to dump + overlays that are in a buffer. */ emacs_abort (); else out->overlays = NULL; -- 2.35.1 --=-=-=--