From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 42931-done@debbugs.gnu.org, larsi@gnus.org, bruno@clisp.org,
p.stephani2@gmail.com, psainty@rcon.net.nz
Subject: bug#42931: 27.1; json-pretty-print-buffer on ~2MB line causes core dump
Date: Tue, 25 Aug 2020 11:19:04 -0700 [thread overview]
Message-ID: <6e7b8005-3865-50d1-be6a-5673fc6dc5c9@cs.ucla.edu> (raw)
In-Reply-To: <83k0xn5k45.fsf@gnu.org>
On 8/24/20 11:12 PM, Eli Zaretskii wrote:
> What about "normal" Emacs builds? They usually have between 2MB and
> 8MB of stack. Should we worry about stack overflow in these cases?
No. On x86-64 Ubuntu 18.04.5 each recursion level consumes 304 bytes. Dividing 2
MB by 304 gives you 6578 stack frames, which means the algorithm could handle a
vector of 2**6578 entries, which can't exist anywhere in the known physical
universe.
On real machines it'd have to be reeeeally tiny stack for this recursion to be a
significant problem now, so tiny that Emacs would crash for countless other
reasons. I'll take the liberty of closing the bug report.
prev parent reply other threads:[~2020-08-25 18:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 13:50 bug#42931: 27.1; json-pretty-print-buffer on ~2MB line causes core dump Phil Sainty
2020-08-19 14:15 ` Lars Ingebrigtsen
2020-08-19 15:18 ` Eli Zaretskii
2020-08-20 13:22 ` Lars Ingebrigtsen
2020-08-20 13:26 ` Philipp Stephani
2020-08-20 13:39 ` Eli Zaretskii
2020-08-24 23:46 ` Paul Eggert
2020-08-25 6:12 ` Eli Zaretskii
2020-08-25 18:19 ` Paul Eggert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6e7b8005-3865-50d1-be6a-5673fc6dc5c9@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=42931-done@debbugs.gnu.org \
--cc=bruno@clisp.org \
--cc=eliz@gnu.org \
--cc=larsi@gnus.org \
--cc=p.stephani2@gmail.com \
--cc=psainty@rcon.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).