bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30481: 26.0.91; infinite recursion + edebug = memory corruption


From: Noam Postavsky
Subject: bug#30481: 26.0.91; infinite recursion + edebug = memory corruption
Date: Fri, 16 Feb 2018 22:30:33 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

tags 30481 fixed
close 30481 26.1
quit

Eli Zaretskii <address@hidden> writes:

>> From: Noam Postavsky <address@hidden>
>> Date: Thu, 15 Feb 2018 22:38:10 -0500
>> 
>> The following patch solves the problem by not calling
>> signal-hook-function when the specpdl array is exhausted.  I think it
>> could be safe for emacs-26.
>
> Please push to emacs-26, and thanks.

Pushed (with test) [1: c352434ab8].

> (Is it practical to have a test for this?)

Yes, actually.  I initially had some trouble reproducing without
instrumenting a function with edebug, but now I see that's just because
a function which let-binds only a single variable hits
max-lisp-eval-depth before max-specpdl-size (edebug's intrumentation
adds more bindings per call).  Let-binding two variables allows to
trigger the bug with just

    (defun foo ()
      (let ((x 1)
            (y 2))
        (foo)))

    (let ((signal-hook-function #'ignore))
      (foo))

[1: c352434ab8]: 2018-02-16 22:13:34 -0500
  Avoid memory corruption with specpdl overflow + edebug (Bug#30481)
  
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c352434ab89617b48c7c1f29342a22e5a5685504





reply via email to

[Prev in Thread] Current Thread [Next in Thread]