From: Eli Zaretskii <eliz@gnu.org>
To: Noam Postavsky <npostavs@gmail.com>
Cc: ynyaaa@gmail.com, 31549@debbugs.gnu.org
Subject: bug#31549: 25.3; bytecompile fails with eval-when-compile
Date: Wed, 23 May 2018 18:08:57 +0300 [thread overview]
Message-ID: <83po1mcsty.fsf@gnu.org> (raw)
In-Reply-To: <87sh6jgtao.fsf@gmail.com> (message from Noam Postavsky on Tue, 22 May 2018 19:33:03 -0400)
> Resent-Sender: help-debbugs@gnu.org
> From: Noam Postavsky <npostavs@gmail.com>
> Date: Tue, 22 May 2018 19:33:03 -0400
> Cc: 31549@debbugs.gnu.org
>
> > (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);
You mean, in expansion of SAFE_ALLOCA_LISP_EXTRA?
> 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?
How about simply signaling a special error instead of memory_full?
Something like
error ("Lisp stack overflow");
next prev parent reply other threads:[~2018-05-23 15:08 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
2018-05-23 15:08 ` Eli Zaretskii [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83po1mcsty.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=31549@debbugs.gnu.org \
--cc=npostavs@gmail.com \
--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 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.