|
From: | Paul Eggert |
Subject: | bug#42931: 27.1; json-pretty-print-buffer on ~2MB line causes core dump |
Date: | Tue, 25 Aug 2020 11:19:04 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
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 in Thread] | Current Thread | [Next in Thread] |