X-Loop: help-debbugs@HIDDEN Subject: bug#59029: 29.0.50; noverlay: pdumper.c: dump_interval_node recursion has no base case Resent-From: Matt Armstrong <matt@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: monnier@HIDDEN, bug-gnu-emacs@HIDDEN Resent-Date: Fri, 04 Nov 2022 23:10:01 +0000 Resent-Message-ID: <handler.59029.B.16676033665324 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 59029 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 59029 <at> debbugs.gnu.org Cc: stefan monnier <monnier@HIDDEN> X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN X-Debbugs-Original-Xcc: stefan monnier <monnier@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.16676033665324 (code B ref -1); Fri, 04 Nov 2022 23:10:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Nov 2022 23:09:26 +0000 Received: from localhost ([127.0.0.1]:55051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1or5oT-0001Nn-Pv for submit <at> debbugs.gnu.org; Fri, 04 Nov 2022 19:09:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:41244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <matt@HIDDEN>) id 1or5oQ-0001NY-Vh for submit <at> debbugs.gnu.org; Fri, 04 Nov 2022 19:09:24 -0400 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 <matt@HIDDEN>) id 1or5oQ-0008Sx-RW for bug-gnu-emacs@HIDDEN; Fri, 04 Nov 2022 19:09:22 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <matt@HIDDEN>) id 1or5oN-0005wi-Va for bug-gnu-emacs@HIDDEN; Fri, 04 Nov 2022 19:09:22 -0400 Received: (Authenticated sender: matt@HIDDEN) by mail.gandi.net (Postfix) with ESMTPSA id A2FF820003 for <bug-gnu-emacs@HIDDEN>; Fri, 4 Nov 2022 23:09:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1667603355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=7rz1iVY55ljXo90EY8HgLkeOeR9W+x92XHpS0cv4xN0=; b=okZlgP/04vnqJF4usJfWcZ0Z3KobR0ezeO+kCV637kzy2KB5s8Tsyqv77aISj03UyYcA8Q 9kkD/bw+oXRnNBwtCzukSQMtxPAT9KxFjxHaudhuasAzbaa3dCwAjaF37JZz/VlkfUXt+S Ahc3fX7BNeTHhf1UV23okHphnNHgOv9I5zlZWO0aACDG30xyBzfoYUhrLO1GkQeRtAJtCQ e5dOpYb+lUSIpRopdhmM/hprQQSAlnBuQjaIoGZYCqYktxRKAgTgQZKftvoUxFVG9yrEcA hDuOUKbV5f9/Lr0cdtN4Y/iZnzFRhGCfUaNPEEPc95TarMFqMqqZNkTO9chVtw== Received: from matt by naz with local (Exim 4.96) (envelope-from <matt@HIDDEN>) id 1or5oF-002BZ2-2d for bug-gnu-emacs@HIDDEN; Fri, 04 Nov 2022 16:09:11 -0700 From: Matt Armstrong <matt@HIDDEN> Date: Fri, 04 Nov 2022 16:09:11 -0700 Message-ID: <87leoqwc4o.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.200; envelope-from=matt@HIDDEN; helo=relay7-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.6 (--) X-Debbugs-cc: Stefan Monnier <monnier@HIDDEN> This has been in my head for weeks but I haven't had time to dig into it. Best get it in a bug. See the code for dump_interval_node() in pdumper.c below. Imagine 'node' has a left child. It will recurse to that child on line 35. That child will recurse back to its parent on line 30. That parent will recurse back to its left child on line 35. This will repeat until the stack blows. All you need is two nodes in the tree. This is not an immediate issue today because apparently Emacs does not dump any buffers with overlays present, or at least, never more than one overlay. I suspect the right fix is to delete lines 26-30, or something like that, but I can't claim I understand this code. 1 static dump_off 2 dump_interval_node (struct dump_context *ctx, struct itree_node *node, 3 dump_off parent_offset) 4 { 5 #if CHECK_STRUCTS && !defined (HASH_itree_node_50DE304F13) 6 # error "itree_node changed. See CHECK_STRUCTS comment in config.h." 7 #endif 8 struct itree_node out; 9 dump_object_start (ctx, &out, sizeof (out)); 10 if (node->parent) 11 dump_field_fixup_later (ctx, &out, node, &node->parent); 12 if (node->left) 13 dump_field_fixup_later (ctx, &out, node, &node->parent); 14 if (node->right) 15 dump_field_fixup_later (ctx, &out, node, &node->parent); 16 DUMP_FIELD_COPY (&out, node, begin); 17 DUMP_FIELD_COPY (&out, node, end); 18 DUMP_FIELD_COPY (&out, node, limit); 19 DUMP_FIELD_COPY (&out, node, offset); 20 DUMP_FIELD_COPY (&out, node, otick); 21 dump_field_lv (ctx, &out, node, &node->data, WEIGHT_STRONG); 22 DUMP_FIELD_COPY (&out, node, red); 23 DUMP_FIELD_COPY (&out, node, rear_advance); 24 DUMP_FIELD_COPY (&out, node, front_advance); 25 dump_off offset = dump_object_finish (ctx, &out, sizeof (out)); 26 if (node->parent) 27 dump_remember_fixup_ptr_raw 28 (ctx, 29 offset + dump_offsetof (struct itree_node, parent), 30 dump_interval_node (ctx, node->parent, offset)); 31 if (node->left) 32 dump_remember_fixup_ptr_raw 33 (ctx, 34 offset + dump_offsetof (struct itree_node, left), 35 dump_interval_node (ctx, node->left, offset)); 36 if (node->right) 37 dump_remember_fixup_ptr_raw 38 (ctx, 39 offset + dump_offsetof (struct itree_node, right), 40 dump_interval_node (ctx, node->right, offset)); 41 return offset; 42 }
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Matt Armstrong <matt@HIDDEN> Subject: bug#59029: Acknowledgement (29.0.50; noverlay: pdumper.c: dump_interval_node recursion has no base case) Message-ID: <handler.59029.B.16676033665324.ack <at> debbugs.gnu.org> References: <87leoqwc4o.fsf@HIDDEN> X-Gnu-PR-Message: ack 59029 X-Gnu-PR-Package: emacs Reply-To: 59029 <at> debbugs.gnu.org Date: Fri, 04 Nov 2022 23:10:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to stefan monnier <monnier@HIDDEN> (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 59029 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 59029: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D59029 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#59029: 29.0.50; noverlay: pdumper.c: dump_interval_node recursion has no base case Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= <gerd.moellmann@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 05 Nov 2022 05:42:02 +0000 Resent-Message-ID: <handler.59029.B59029.166762691315034 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 59029 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Matt Armstrong <matt@HIDDEN> Cc: 59029 <at> debbugs.gnu.org, stefan monnier <monnier@HIDDEN> Received: via spool by 59029-submit <at> debbugs.gnu.org id=B59029.166762691315034 (code B ref 59029); Sat, 05 Nov 2022 05:42:02 +0000 Received: (at 59029) by debbugs.gnu.org; 5 Nov 2022 05:41:53 +0000 Received: from localhost ([127.0.0.1]:55313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1orBwG-0003uN-LT for submit <at> debbugs.gnu.org; Sat, 05 Nov 2022 01:41:53 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:39462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>) id 1orBwD-0003u2-18 for 59029 <at> debbugs.gnu.org; Sat, 05 Nov 2022 01:41:50 -0400 Received: by mail-ed1-f48.google.com with SMTP id f7so10350645edc.6 for <59029 <at> debbugs.gnu.org>; Fri, 04 Nov 2022 22:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=JLx5uQU6POKTXM1+DX38rzmmgN8lknzYRrgfAACpD/o=; b=EOOsKX5hyIjYCIJI8yfb88jmklgEIfgScvm7aoG7BKjlTr/f6/XQNky5sjazNfjRUO uw6y069mysm1FB4LD2vGZT2VIB+QL+2ekRfUA0uJaGweVOr2TaxoKE6hQzWq4yThq0s+ iijXV1NhK/L+Vc2M+IJt+q5rfh02FHaPq3NQPPEtsG9xDuWhXabk8+NuN7aR4jPSrtAv wguasFLzpV8vea21TaE+NeOLY6pQfEWyF64nOrg9NVa+P3wO4v8VEc1Z/AbWNFsKRKCr kl08D8Yz2n1MbjwlNTwQ6jr6g1kVCtLePQl0sJ6b2sY+1TxXOAmbNApqFr5qUeeBA+GB goAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JLx5uQU6POKTXM1+DX38rzmmgN8lknzYRrgfAACpD/o=; b=LVEQ/mK5sxpjcNaeEPXOFLjDHDAJSJNQrof6yIOzL1eltsxDzkndcxQQ65Bqt9zHSM nR0kRuCkJcvhhFiYmDduBvqEt0C2zKwoJViOGO0ZQI5RmrLgCDslOeN0CCn7znMA/r94 tKDw9Iq3HMa4SeS4JDdU30F6YJ+7IzAAhI5DOGSQfgKKUt9hkxRIxC57SFIRN8rarIRy TVQDXCLh3ZcLSX2cON5EkDzdEdZFkUohslmCm0NxNH+ipcyQKiMEMPeMLkAdyFH6W19Y 9upBHup+txKnyJvPBVbXJS0gF78hf1hK3wWPiF/4w9fEad4dKKKyXbsPuhpIVb/u+VUN JCHA== X-Gm-Message-State: ACrzQf0lt61qLP1VGXRl1hRua+BmPWTrZYPJBjGwkZPti+WJSh06fiOY FR8ASiAm9QP1wCQ7xPMQx/4= X-Google-Smtp-Source: AMsMyM7m47wneVPXBji304x1Ap+UGunj42IvrUR8m7YskZ3J6UWS7BiPQL1KqAQeHIdfYqaCmz6tEg== X-Received: by 2002:a05:6402:1004:b0:464:778:c516 with SMTP id c4-20020a056402100400b004640778c516mr17098805edu.348.1667626902987; Fri, 04 Nov 2022 22:41:42 -0700 (PDT) Received: from Mini.fritz.box (p4fe3a85e.dip0.t-ipconnect.de. [79.227.168.94]) by smtp.gmail.com with ESMTPSA id x14-20020a170906134e00b0073022b796a7sm461927ejb.93.2022.11.04.22.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 22:41:42 -0700 (PDT) From: Gerd =?UTF-8?Q?M=C3=B6llmann?= <gerd.moellmann@HIDDEN> In-Reply-To: <87leoqwc4o.fsf@HIDDEN> (Matt Armstrong's message of "Fri, 04 Nov 2022 16:09:11 -0700") References: <87leoqwc4o.fsf@HIDDEN> Date: Sat, 05 Nov 2022 06:41:41 +0100 Message-ID: <m2zgd6vtyi.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Matt Armstrong <matt@HIDDEN> writes: > X-Debbugs-cc: Stefan Monnier <monnier@HIDDEN> > > This has been in my head for weeks but I haven't had time to dig into > it. Best get it in a bug. > > See the code for dump_interval_node() in pdumper.c below. > > Imagine 'node' has a left child. It will recurse to that child on line > 35. That child will recurse back to its parent on line 30. That parent > will recurse back to its left child on line 35. This will repeat until > the stack blows. All you need is two nodes in the tree. > > This is not an immediate issue today because apparently Emacs does not > dump any buffers with overlays present, or at least, never more than one > overlay. I suspect the right fix is to delete lines 26-30, or something > like that, but I can't claim I understand this code. > > 1 static dump_off > 2 dump_interval_node (struct dump_context *ctx, struct itree_node *node, > 3 dump_off parent_offset) > 4 { > 5 #if CHECK_STRUCTS && !defined (HASH_itree_node_50DE304F13) > 6 # error "itree_node changed. See CHECK_STRUCTS comment in config.h." > 7 #endif > 8 struct itree_node out; > 9 dump_object_start (ctx, &out, sizeof (out)); > 10 if (node->parent) > 11 dump_field_fixup_later (ctx, &out, node, &node->parent); > 12 if (node->left) > 13 dump_field_fixup_later (ctx, &out, node, &node->parent); > 14 if (node->right) > 15 dump_field_fixup_later (ctx, &out, node, &node->parent); > 16 DUMP_FIELD_COPY (&out, node, begin); > 17 DUMP_FIELD_COPY (&out, node, end); > 18 DUMP_FIELD_COPY (&out, node, limit); > 19 DUMP_FIELD_COPY (&out, node, offset); > 20 DUMP_FIELD_COPY (&out, node, otick); > 21 dump_field_lv (ctx, &out, node, &node->data, WEIGHT_STRONG); > 22 DUMP_FIELD_COPY (&out, node, red); > 23 DUMP_FIELD_COPY (&out, node, rear_advance); > 24 DUMP_FIELD_COPY (&out, node, front_advance); > 25 dump_off offset = dump_object_finish (ctx, &out, sizeof (out)); > 26 if (node->parent) > 27 dump_remember_fixup_ptr_raw > 28 (ctx, > 29 offset + dump_offsetof (struct itree_node, parent), > 30 dump_interval_node (ctx, node->parent, offset)); > 31 if (node->left) > 32 dump_remember_fixup_ptr_raw > 33 (ctx, > 34 offset + dump_offsetof (struct itree_node, left), > 35 dump_interval_node (ctx, node->left, offset)); > 36 if (node->right) > 37 dump_remember_fixup_ptr_raw > 38 (ctx, > 39 offset + dump_offsetof (struct itree_node, right), > 40 dump_interval_node (ctx, node->right, offset)); > 41 return offset; > 42 } 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.
Received: (at control) by debbugs.gnu.org; 5 Nov 2022 18:07:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 05 14:07:09 2022 Received: from localhost ([127.0.0.1]:58000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1orNZV-0001jv-2O for submit <at> debbugs.gnu.org; Sat, 05 Nov 2022 14:07:09 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:43187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <matt@HIDDEN>) id 1orNZR-0001jL-Q4 for control <at> debbugs.gnu.org; Sat, 05 Nov 2022 14:07:07 -0400 Received: (Authenticated sender: matt@HIDDEN) by mail.gandi.net (Postfix) with ESMTPSA id 3FE8C20007 for <control <at> debbugs.gnu.org>; Sat, 5 Nov 2022 18:06:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1667671619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=UXlInj+V1fxYGo5FcoRXxfPcWoX/j7Dw1swOGvFRQBc=; b=JvK+5uJRGPxNZWbmS9IXkyyqwPNRlevHT9Z62gTh5kDs9ckCFOqL9JKIr5gZX8m3RguObB zd7+vCLcMieNOgPoHaApzus923p9oHngtq1u4tJAJ4qXKv4Sp51LqUsjsAYzlbX7SomFNm LGO5+eY0UK+k1VXr7otEMBOhGZDw3j4AD4Zm221jJf59Miu5NxY7Zy11C7QOjqcEPsHWzI TAJw0i1mPIunWpHdGVXwNQTwvmH9gQcx00jblWArv7g1/JXoa7C7NTcjEerXPlSezgsyjc a7jA8nv74aXjOL++xTgdzHonXh8aJV7Q2hzb9RdfDvy4WAGwIi2/tsVgaG+89A== Received: from matt by naz with local (Exim 4.96) (envelope-from <matt@HIDDEN>) id 1orNZH-0006Bs-1i for control <at> debbugs.gnu.org; Sat, 05 Nov 2022 11:06:55 -0700 From: Matt Armstrong <matt@HIDDEN> To: control <at> debbugs.gnu.org Subject: control message for bug #59029 Date: Sat, 05 Nov 2022 11:06:55 -0700 Message-ID: <87h6zdwa0w.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) retitle 59029 Dumping Emacs crashes when buffers have overlays quit
X-Loop: help-debbugs@HIDDEN Subject: bug#59029: 29.0.50; noverlay: pdumper.c: dump_interval_node recursion has no base case Resent-From: Matt Armstrong <matt@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 05 Nov 2022 18:10:01 +0000 Resent-Message-ID: <handler.59029.B59029.16676717826935 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 59029 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Gerd =?UTF-8?Q?M=C3=B6llmann?= <gerd.moellmann@HIDDEN> Cc: 59029 <at> debbugs.gnu.org, stefan monnier <monnier@HIDDEN> Received: via spool by 59029-submit <at> debbugs.gnu.org id=B59029.16676717826935 (code B ref 59029); Sat, 05 Nov 2022 18:10:01 +0000 Received: (at 59029) by debbugs.gnu.org; 5 Nov 2022 18:09:42 +0000 Received: from localhost ([127.0.0.1]:58009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1orNbx-0001nl-Uu for submit <at> debbugs.gnu.org; Sat, 05 Nov 2022 14:09:42 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:43737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <matt@HIDDEN>) id 1orNbv-0001nY-RS for 59029 <at> debbugs.gnu.org; Sat, 05 Nov 2022 14:09:40 -0400 Received: (Authenticated sender: matt@HIDDEN) 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== Received: from matt by naz with local (Exim 4.96) (envelope-from <matt@HIDDEN>) id 1orNbl-0006Cm-34; Sat, 05 Nov 2022 11:09:29 -0700 From: Matt Armstrong <matt@HIDDEN> In-Reply-To: <m2zgd6vtyi.fsf@HIDDEN> ("Gerd =?UTF-8?Q?M=C3=B6llmann?="'s message of "Sat, 05 Nov 2022 06:41:41 +0100") References: <87leoqwc4o.fsf@HIDDEN> <m2zgd6vtyi.fsf@HIDDEN> Date: Sat, 05 Nov 2022 11:09:29 -0700 Message-ID: <87cza1w9wm.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> 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 <matt@HIDDEN> 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 --=-=-=--
Received: (at control) by debbugs.gnu.org; 5 Nov 2022 19:32:37 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 05 15:32:37 2022 Received: from localhost ([127.0.0.1]:58099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1orOuD-00063y-Cg for submit <at> debbugs.gnu.org; Sat, 05 Nov 2022 15:32:37 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:45861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <matt@HIDDEN>) id 1orOu9-00063f-NB for control <at> debbugs.gnu.org; Sat, 05 Nov 2022 15:32:35 -0400 Received: (Authenticated sender: matt@HIDDEN) by mail.gandi.net (Postfix) with ESMTPSA id 54E4EFF808 for <control <at> debbugs.gnu.org>; Sat, 5 Nov 2022 19:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1667676747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=SBKWag1huvscW8aKSINueihssY4dRMEzrheD16Rmg8Y=; b=PeqLwJ16ZJf3FPboIcXNd5fCEnxbHV0U/wW+h0GSqPZAyBHzVFaHYGgtPJPARPMe7blX4/ hoyN4ps+Wq6OxvmBKapzXLqIiCjH72zvR8S+cnoH9B2F2o2+2c7Zs74Y+0+yMoo9t9nFxb 0q+UXrA0sq9O+/D2sB+0ruAyOelEh2F2PjB/oKp2XMbp96vZzohVVpCMjtNk0mOwo7QDnY sH06/gmeu2NBiGOKFru4y3wbepwIit0hBbG/jjoy4YcLF3ZOWZkVy+Kh6XxnpZcy0HN7Xk RFc+ncXJP8OuVChYzp9/1h9xowBNibT9vREOhqtW4vXOjR2VxAC/D6f1TsMiPg== Received: from matt by naz with local (Exim 4.96) (envelope-from <matt@HIDDEN>) id 1orOu0-000ECn-1u for control <at> debbugs.gnu.org; Sat, 05 Nov 2022 12:32:24 -0700 To: control <at> debbugs.gnu.org From: Matt Armstrong <matt@HIDDEN> Subject: control message for bug #59029 Message-Id: <E1orOu0-000ECn-1u@naz> Date: Sat, 05 Nov 2022 12:32:24 -0700 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) tags 59029 + patch quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.