GNU bug report logs -
#31549
25.3; bytecompile fails with eval-when-compile
Previous Next
Reported by: ynyaaa <at> gmail.com
Date: Tue, 22 May 2018 09:02:01 UTC
Severity: minor
Found in version 25.3
Fixed in version 26.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> --- i/src/lisp.h
>> +++ w/src/lisp.h
>> @@ -4662,7 +4662,7 @@ egetenv (const char *var)
>> if (INT_MULTIPLY_WRAPV (nelt, word_size, &alloca_nbytes) \
>> || INT_ADD_WRAPV (alloca_nbytes, extra, &alloca_nbytes) \
>> || SIZE_MAX < alloca_nbytes) \
>> - memory_full (SIZE_MAX); \
>> + error ("Oversize allocation (0x%lX)", (size_t) alloca_nbytes); \
>> else if (alloca_nbytes <= sa_avail) \
>> (buf) = AVAIL_ALLOCA (alloca_nbytes); \
>> else \
>
> I agree that memory_full is suboptimal here, but "Oversize allocation"
> with a number is too technical to be useful to the programmer who
> bumps into this problem. We need some text which will indicate that
> the program is too "complex" (a better word is needed here) and should
> be simplified. Can you come up with something along those lines?
Sorry, if my initial response confused things, but 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.
This bug report was last modified 6 years and 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.