bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66743: 30.0.50; Crash when dumping reftex


From: Ihor Radchenko
Subject: bug#66743: 30.0.50; Crash when dumping reftex
Date: Fri, 27 Oct 2023 09:08:02 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> +    {
>> +      /* We haven't implemented the code to dump overlays.  */
>> +      error ("Dumping overlays in buffers is not yet implemented.  
>> Aborting...\n");
>> +      emacs_abort ();
>> +    }
>
> If you call 'error' in batch mode, do you really need emacs_abort?

If `error' does all the necessary cleanup, `emacs_abort' is indeed not
necessary. But that's not very obvious from the source code.

See the attached patch with `emacs_abort` call removed.
I also removed the final newline, as it does not seem to be used in
other instances of error (...) calls.

>From 18d896985e7373320afe8447cf836717797e5cb2 Mon Sep 17 00:00:00 2001
Message-ID: 
<18d896985e7373320afe8447cf836717797e5cb2.1698397578.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Thu, 26 Oct 2023 14:52:32 +0300
Subject: [PATCH v3] * src/pdumper.c (dump_buffer): Print message when aborting
 (bug#66743)

When the buffer contains overlays, it cannot be dumped.  Print a
message describing this fact before aborting Emacs.
---
 src/pdumper.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/pdumper.c b/src/pdumper.c
index 315a31e2bcb..9a3870181e3 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -2862,8 +2862,10 @@ dump_buffer (struct dump_context *ctx, const struct 
buffer *in_buffer)
   DUMP_FIELD_COPY (out, buffer, long_line_optimizations_p);
 
   if (!itree_empty_p (buffer->overlays))
-    /* We haven't implemented the code to dump overlays.  */
-    emacs_abort ();
+    {
+      /* We haven't implemented the code to dump overlays.  */
+      error ("Dumping overlays in buffers is not yet implemented.  
Aborting...");
+    }
   else
     out->overlays = NULL;
 
-- 
2.42.0

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]