GNU bug report logs - #42931
27.1; json-pretty-print-buffer on ~2MB line causes core dump

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Wed, 19 Aug 2020 13:52:02 UTC

Severity: normal

Found in version 27.1

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Phil Sainty <psainty <at> rcon.net.nz>
Cc: 42931 <at> debbugs.gnu.org, Philipp Stephani <p.stephani2 <at> gmail.com>, Lars Ingebrigtsen <larsi <at> gnus.org>, Bruno Haible <bruno <at> clisp.org>, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#42931: 27.1; json-pretty-print-buffer on ~2MB line causes core dump
Date: Mon, 24 Aug 2020 16:46:01 -0700
The patch I installed into Emacs master for Bug#43016 also fixes Bug#42931's 
test case, at least for me. However, Bug#42931 prompted me to change the way 
that the Gnulib diffseq module recurses so that the stack size is O(log N) 
rather than O(N). I installed this change into Gnulib, here:

https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=7aadb23803a8fb71d07e6e87ffb1ca510d86f8ef

and propagated this into Emacs master, here:

https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d494f9e81a6d11dcf6c22333cd950989b2051dff

I doubt whether this patch needs to be backported into the emacs-27 branch.

In theory even O(log N) might not be good enough if Emacs has a tiny stack and a 
huge buffer, but I doubt whether this is of practical concern.

I'll cc this to Bruno Haible to give him a heads-up, since he created the 
diffseq module. Bruno, the bug report is here:

https://bugs.gnu.org/42931




This bug report was last modified 4 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.