From: Paul Eggert <eggert@cs.ucla.edu>
To: "Sheng Yang" <yangsheng6810@gmail.com>,
"Noam Postavsky" <npostavs@gmail.com>
Cc: 31995@debbugs.gnu.org
Subject: bug#31995: 26.1; Condition-case failed to catch error
Date: Thu, 12 Jul 2018 22:43:38 -0500 [thread overview]
Message-ID: <cf68d93a-c859-e466-5288-fee2961982c6@cs.ucla.edu> (raw)
In-Reply-To: <6be07045-d79a-26a9-cd63-e2c294cd0187@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 482 bytes --]
On 07/12/2018 07:29 PM, Sheng Yang (杨圣) wrote:
> the buffer is totally a waste of space when read1 is dealing with
> everything ("[", "]", "(", ")", "#", "=", numbers, etc.) other than
> the name of a symbol (usually tens of characters) or a string
Thanks for reporting this. I attempted to work around the immediate
problem by installing the attached into the emacs-26 branch. Although
this doesn't address the overall problem of stack overflow, that is less
pressing.
[-- Attachment #2: 0001-Lessen-stack-consumption-in-recursive-read1.patch --]
[-- Type: text/x-patch, Size: 796 bytes --]
From b38b91a83491b6812e8267d0247355f0e8e3e189 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 12 Jul 2018 20:23:07 -0700
Subject: [PATCH] Lessen stack consumption in recursive read1
* src/lread.c (read1): Shrink local buffer size from
MAX_ALLOCA to 128 (Bug#31995).
---
src/lread.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lread.c b/src/lread.c
index 72523c057f..d5ba48a170 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2677,7 +2677,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
int c;
bool uninterned_symbol = false;
bool multibyte;
- char stackbuf[MAX_ALLOCA];
+ char stackbuf[128]; /* Small, as read1 is recursive (Bug#31995). */
current_thread->stack_top = stackbuf;
*pch = 0;
--
2.17.1
prev parent reply other threads:[~2018-07-13 3:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 16:54 bug#31995: 26.1; Condition-case failed to catch error Sheng Yang
2018-07-11 21:48 ` Noam Postavsky
2018-07-12 5:46 ` Sheng Yang
2018-07-13 0:29 ` Sheng Yang
2018-07-13 3:43 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf68d93a-c859-e466-5288-fee2961982c6@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=31995@debbugs.gnu.org \
--cc=npostavs@gmail.com \
--cc=yangsheng6810@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.