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

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

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


From: Eli Zaretskii
Subject: bug#42931: 27.1; json-pretty-print-buffer on ~2MB line causes core dump
Date: Thu, 20 Aug 2020 16:39:26 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: psainty@orcon.net.nz,  42931@debbugs.gnu.org
> Date: Thu, 20 Aug 2020 15:22:31 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > looks like stack overflow?  I guess the recursive nature of compareseq
> > is got to cause this at some point?
> 
> Yup.
> 
> I'm not sure what to do about it, though.  One easy way to "fix this"
> would be to not use replace-region-contents in json-pretty-print if the
> region is very large...  but that's kinda just wallpapering over the
> problem.
> 
> replace-region-contents itself could decide to not do all its fancy
> stuff if the region is very large, and just replace the contents in the
> normal way instead?

compareseq is a Gnulib module, so maybe its implementation could be
fixed to bail out when the recursion becomes too deep?





reply via email to

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