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

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

bug#27571: #27571; C stack overflow from `prin1' on deeply nested lisp o


From: Keith David Bershatsky
Subject: bug#27571: #27571; C stack overflow from `prin1' on deeply nested lisp object.
Date: Mon, 08 Jan 2018 17:38:38 -0800

Dear Paul and Noam:

I have determined that bug #27571 was introduced on November 19, 2016 with 
commit c61ee94959ba96b2a327df0684593f7e569e30be.  The following patch to the 
Emacs 26 branch as of today (01/08/2018) reverses the commit and enables the 
test below to be completed successfully.

[FYI:  I am on OSX 10.6.8 and am manually increasing the stack limit with 
`ulimit -S -s unlimited` so that I can have rather large custom undo-tree 
histories.]

(require 'cl-lib)

(defun make-deep-object (depth)
    (let ((obj 1))
      (while (> (cl-decf depth) 0)
        (setq obj (vector (list obj))))
      obj))

;;; STACK OVERFLOW:  problem with `prin1-to-string'
;;; The bug was introduced on November 19, 2016 with
;;; commit:  c61ee94959ba96b2a327df0684593f7e569e30be
(let* ((print-circle t)
       (max-lisp-eval-depth most-positive-fixnum)
       (max-specpdl-size most-positive-fixnum)
       (deep-object (make-deep-object 6000))
       (string (prin1-to-string deep-object)))
  (when string
    (message "Bug #27571:  Success! (%d)" (length string))))

Attachment: patch.diff
Description: application/diff


reply via email to

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