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

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

bug#27571: Crashing when printing a lisp object.


From: npostavs
Subject: bug#27571: Crashing when printing a lisp object.
Date: Mon, 03 Jul 2017 23:32:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)

Keith David Bershatsky <address@hidden> writes:

> I will work on trying to come up with a way to create the 6652-count
> example that doesn't involve using the custom version of undo-tree to
> go from a count of 6651 to a count of 6652.

This seems to do the job for me:

    (require 'cl-lib)

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

    (setq print-circle t)

    (prin1-to-string (make-deep-object 4964))

With the default stack limit of 8192 I get a crash at 4964.  After doing
'ulimit -S -s unlimited' I could evaluate (prin1-to-string
(make-deep-object 640000)) successfully (I didn't bother testing higher,
since that already takes quite a while to run).

Setting a particular value for stack size limit didn't help, below 5MB
it still crashed, and above I got a glib error about failure to create a
thread.

    (process:23894): GLib-ERROR **: creating thread 'gmain': Error creating 
thread: Resource temporarily unavailable

    Program received signal SIGTRAP, Trace/breakpoint trap.
    0x00007ffebcb3aff1 in ?? () from /usr/lib/libglib-2.0.so.0

Emacs has some code in main() to increase the stack size limit (search
for 'setrlimit'), I'm not sure how that interacts with the limits above.

> In terms of the reference to line 1350, I'm not sure what that refers
> to.

I was just checking we have correponding source lines, i.e., that line
1350 of src/print.c is the opening brace of print_object.





reply via email to

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