From: Noam Postavsky <npostavs@gmail.com>
To: ynyaaa@gmail.com
Cc: 31549@debbugs.gnu.org
Subject: bug#31549: 25.3; bytecompile fails with eval-when-compile
Date: Tue, 22 May 2018 19:33:03 -0400 [thread overview]
Message-ID: <87sh6jgtao.fsf@gmail.com> (raw)
In-Reply-To: <8636yknjy1.fsf@gmail.com> (ynyaaa's message of "Tue, 22 May 2018 18:00:54 +0900")
ynyaaa@gmail.com writes:
> (byte-compile `(eval-when-compile (list ,@(make-list 2047 0))))
>
> Evaluating the form above, emacs (with -Q option) reports
> Error: Memory exhausted--use C-x s then exit and restart Emacs
> in *Compile-Log* buffer.
> The returned value of the form is t.
The error is coming from exec_byte_code:
if (MAX_ALLOCA / word_size <= XFASTINT (maxdepth))
memory_full (SIZE_MAX);
It's more like a Lisp stack overflow than a memory exhausted situation
though, hardly calls for restarting Emacs. Perhaps the byte compiler
should refuse to compile such a large expression?
I can't reproduce in Emacs 26, but only because MAX_ALLOCA is bigger, I
think.
next prev parent reply other threads:[~2018-05-22 23:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 9:00 bug#31549: 25.3; bytecompile fails with eval-when-compile ynyaaa
2018-05-22 23:33 ` Noam Postavsky [this message]
2018-05-23 15:08 ` Eli Zaretskii
2018-05-23 22:34 ` Noam Postavsky
2018-05-24 16:40 ` Eli Zaretskii
2018-05-24 21:18 ` Noam Postavsky
2018-05-25 6:19 ` Eli Zaretskii
2018-05-27 15:09 ` Noam Postavsky
2018-05-27 16:22 ` Eli Zaretskii
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=87sh6jgtao.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=31549@debbugs.gnu.org \
--cc=ynyaaa@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 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).