From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#31549: 25.3; bytecompile fails with eval-when-compile Date: Thu, 24 May 2018 17:18:17 -0400 Message-ID: <87603chhwm.fsf@gmail.com> References: <8636yknjy1.fsf@gmail.com> <87sh6jgtao.fsf@gmail.com> <83po1mcsty.fsf@gnu.org> <87k1rugfxd.fsf@gmail.com> <83fu2hatxv.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1527196631 8796 195.159.176.226 (24 May 2018 21:17:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 May 2018 21:17:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: ynyaaa@gmail.com, 31549@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 24 23:17:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLxbe-0002BT-Ax for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 May 2018 23:17:06 +0200 Original-Received: from localhost ([::1]:40687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLxdl-0003bk-3O for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 May 2018 17:19:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLxdb-0003bS-Oq for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:19:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLxdW-0002mV-21 for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:19:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39042) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLxdV-0002mR-VC for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fLxdV-000404-Pi for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 May 2018 21:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31549 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31549-submit@debbugs.gnu.org id=B31549.152719670715335 (code B ref 31549); Thu, 24 May 2018 21:19:01 +0000 Original-Received: (at 31549) by debbugs.gnu.org; 24 May 2018 21:18:27 +0000 Original-Received: from localhost ([127.0.0.1]:46939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLxcx-0003zH-2L for submit@debbugs.gnu.org; Thu, 24 May 2018 17:18:27 -0400 Original-Received: from mail-it0-f51.google.com ([209.85.214.51]:51034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLxcv-0003z2-MC for 31549@debbugs.gnu.org; Thu, 24 May 2018 17:18:26 -0400 Original-Received: by mail-it0-f51.google.com with SMTP id p3-v6so4261044itc.0 for <31549@debbugs.gnu.org>; Thu, 24 May 2018 14:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ojNcrlvtuHHVSm1EDqB6j+t4JokxLw1m9uRCTuUL8Cg=; b=pToteZC3h/OZRbj9gO3JzlCygfOMw5hdzLQiBuIg6Y6hPCMqgfWUelzgXyNryA/uY9 oRJOQtZ/qF62D4Dw+uPrf6AyPLEDFXullczWMnEI8BZyuya6zqagPCi/QahCUymF/kbc Od6Ff3dvIcKxlo0VPd8KrTb7Gg1ucMjYReM8vJX5CXGqQqRt19n+XLrnXTwDwK+zwyYd /y1W7tZpvoGYZkaR9nCpE0AEX3Sl3FmUM/X1fw9Uy7VKinE2uSx92V3kV9Sj3df9LQSZ yGllCM60PdwAWpu1TH7wtYXGbipTs6eTUmXH1p9ziJeUUYe0C1niI7oxSawafVZRYeY4 xqRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ojNcrlvtuHHVSm1EDqB6j+t4JokxLw1m9uRCTuUL8Cg=; b=ThOzgW/DOSwxhzgn7Nt22I76ozvnrHZb27zDyoM9zPWZq6VAhUXzio//6AUCBqdOXE KtRO6e9UjeLPQhY12AsoXKEQlMnPQ/0CECrChw5rH1a6SyfWi01x9q8RO5TtPKXt+Xao 9xkeDNPAGWjKStT6Iftocw2jGnO67oSuZbD+PUynSLJVIC5Nj08IrMYL1vemCX3TgqmD ELc4e38tCW8yGq0pW7nQ0CQ1UDwRo0zd9BOkIdIUTBNn2CYgScTccrdwPBNJbdaQEUgl 0+GGWtKRZHRQ/hw96Z/Aw9w+t+8XQHgEMA4pAMEJWaM5cOhqPQNCWzHTbm05QXoX69Hm 8R8g== X-Gm-Message-State: ALKqPwcR4MEhZo2YbM25Zx2zz0r0WVcCbfyg5xsCA3YoMk+pHPllszxa pCYzM2ZqzOqx9woMU7GduiL8Bw== X-Google-Smtp-Source: AB8JxZpUHzqbgJkenu5a9TimMVfaZ/ghRWZrs1eJxCubYkBb6S8cN30atpp3tI0FtdSRFiJql38CNA== X-Received: by 2002:a24:b08:: with SMTP id 8-v6mr11616101itd.30.1527196699976; Thu, 24 May 2018 14:18:19 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id z72-v6sm15389038ioz.64.2018.05.24.14.18.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 May 2018 14:18:18 -0700 (PDT) In-Reply-To: <83fu2hatxv.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 24 May 2018 19:40:12 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146497 Archived-At: Eli Zaretskii 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.