Subject: bug#31549: 25.3; bytecompile fails with eval-when-compile

From: Noam Postavsky <[email-masked]>
Date: Sun, 27 May 2018 11:09:48 -0400

close 31549
quit

Eli Zaretskii <[email-masked]> writes:

>> From: Noam Postavsky <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Thu, 24 May 2018 17:18:17 -0400
>> 
>> Sorry, if my initial response confused things
>
> Seeking the truth doesn't always work in linear ways ;-)
>
>> I'm fairly certain now that there is no way to trigger this error by
>> compiling a Lisp program in Emacs 26.  It would have to require a
>> stack depth of 2^63 (or 2^31 on 32 bit builds), I imagine actual
>> memory exhaustion would happen first.
>> 
>> Actually, even though memory_full probably isn't correct, maybe we
>> should just leave it.  Triggering this error probably indicates some bug
>> in Emacs, so the first thing to do after hitting it would be to set a
>> breakpoint in gdb; this is a bit more convenient to do with memory_full
>> than Fsignal or error: fewer false positives.
>
> Fine by me, but do we understand what change(s) between 25.3 and 26.1
> fixed this problem?  If not, maybe we should try to understand that?

Ah, here it is, seems pretty straightforward.

[1: cb71a119f7]: 2016-08-09 01:31:22 -0700
  Remove arbitrary limit on bytecode maxdepth
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=cb71a119f7231984e010cc28ef33854721036a0f