(lldb) target create "nextstep/Emacs.app/Contents/MacOS/Emacs"
Traceback (most recent call last):
File "", line 1, in
File "/opt/brew/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 52, in
import weakref
File "/opt/brew/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 14, in
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
Current executable set to 'nextstep/Emacs.app/Contents/MacOS/Emacs' (x86_64).
(lldb) b emacs.c:832
Breakpoint 1: where = Emacs`main + 1463 at emacs.c:832, address = 0x0000000100133ef7
(lldb) run -Q
Process 96113 launched: '/Users/kostya/Downloads/emacs-working.git/nextstep/Emacs.app/Contents/MacOS/Emacs' (x86_64)
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x0000000100133ef7 Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:832
829 if (getrlimit (RLIMIT_STACK, &rlim) == 0
830 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= LONG_MAX)
831 {
-> 832 long lim = rlim.rlim_cur;
833
834 /* Approximate the amount regex.c needs per unit of
835 re_max_failures, then add 33% to cover the size of the
Target 0: (Emacs) stopped.
(lldb) e lim
(long) $0 = 0
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100133f05 Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:838
835 re_max_failures, then add 33% to cover the size of the
836 smaller stacks that regex.c successively allocates and
837 discards on its way to the maximum. */
-> 838 int ratio = 20 * sizeof (char *);
839 ratio += ratio / 3;
840
841 /* Extra space to cover what we're likely to use for other reasons. */
Target 0: (Emacs) stopped.
(lldb) e lim
(long) $1 = 67104768
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100133f0f Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:839
836 smaller stacks that regex.c successively allocates and
837 discards on its way to the maximum. */
838 int ratio = 20 * sizeof (char *);
-> 839 ratio += ratio / 3;
840
841 /* Extra space to cover what we're likely to use for other reasons. */
842 int extra = 200000;
Target 0: (Emacs) stopped.
(lldb) e ratio
(int) $2 = 160
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100133f38 Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:842
839 ratio += ratio / 3;
840
841 /* Extra space to cover what we're likely to use for other reasons. */
-> 842 int extra = 200000;
843
844 bool try_to_grow_stack = true;
845 #ifndef CANNOT_DUMP
Target 0: (Emacs) stopped.
(lldb) e ratio
(int) $3 = 213
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100133f42 Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:844
841 /* Extra space to cover what we're likely to use for other reasons. */
842 int extra = 200000;
843
-> 844 bool try_to_grow_stack = true;
845 #ifndef CANNOT_DUMP
846 try_to_grow_stack = !noninteractive || initialized;
847 #endif
Target 0: (Emacs) stopped.
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100133f49 Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:846
843
844 bool try_to_grow_stack = true;
845 #ifndef CANNOT_DUMP
-> 846 try_to_grow_stack = !noninteractive || initialized;
847 #endif
848
849 if (try_to_grow_stack)
Target 0: (Emacs) stopped.
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100133f7d Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:849
846 try_to_grow_stack = !noninteractive || initialized;
847 #endif
848
-> 849 if (try_to_grow_stack)
850 {
851 long newlim = re_max_failures * ratio + extra;
852
Target 0: (Emacs) stopped.
(lldb) e try_to_grow_stack
(bool) $4 = true
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100133f91 Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:851
848
849 if (try_to_grow_stack)
850 {
-> 851 long newlim = re_max_failures * ratio + extra;
852
853 /* Round the new limit to a page boundary; this is needed
854 for Darwin kernel 15.4.0 (see Bug#23622) and perhaps
Target 0: (Emacs) stopped.
(lldb) e newlim
(long) $5 = 0
(lldb) e re_max_failures
(size_t) $6 = 16107485546189635934
(lldb) e extra
(int) $7 = 200000
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100133fb0 Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:860
857 RLIM_INFINITY etc. since in practice when they are
858 nonnegative they are so large that the code does the
859 right thing anyway. */
-> 860 long pagesize = getpagesize ();
861 newlim += pagesize - 1;
862 if (0 <= rlim.rlim_max && rlim.rlim_max < newlim)
863 newlim = rlim.rlim_max;
Target 0: (Emacs) stopped.
(lldb) e newlim
(long) $8 = 67104578
(lldb) e re_max_failures
(size_t) $9 = 16107485546189635934
(lldb) e ratio
(int) $10 = 213
(lldb) e re_max_failures * ratio
(unsigned long) $11 = 18246767702125404982
(lldb) e re_max_failures * ratio + extra
(unsigned long) $12 = 18246767702125604982
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100133fc3 Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:861
858 nonnegative they are so large that the code does the
859 right thing anyway. */
860 long pagesize = getpagesize ();
-> 861 newlim += pagesize - 1;
862 if (0 <= rlim.rlim_max && rlim.rlim_max < newlim)
863 newlim = rlim.rlim_max;
864 newlim -= newlim % pagesize;
Target 0: (Emacs) stopped.
(lldb) e pagesize
(long) $13 = 4096
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100133fdc Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:862
859 right thing anyway. */
860 long pagesize = getpagesize ();
861 newlim += pagesize - 1;
-> 862 if (0 <= rlim.rlim_max && rlim.rlim_max < newlim)
863 newlim = rlim.rlim_max;
864 newlim -= newlim % pagesize;
865
Target 0: (Emacs) stopped.
(lldb) e newlim
(long) $14 = 67108673
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100133ffd Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:863
860 long pagesize = getpagesize ();
861 newlim += pagesize - 1;
862 if (0 <= rlim.rlim_max && rlim.rlim_max < newlim)
-> 863 newlim = rlim.rlim_max;
864 newlim -= newlim % pagesize;
865
866 if (pagesize <= newlim - lim)
Target 0: (Emacs) stopped.
(lldb) e rlim.rlim_max
(rlim_t) $15 = 67104768
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x000000010013400b Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:864
861 newlim += pagesize - 1;
862 if (0 <= rlim.rlim_max && rlim.rlim_max < newlim)
863 newlim = rlim.rlim_max;
-> 864 newlim -= newlim % pagesize;
865
866 if (pagesize <= newlim - lim)
867 {
Target 0: (Emacs) stopped.
(lldb) e newlim
(long) $16 = 67104768
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x000000010013402c Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:866
863 newlim = rlim.rlim_max;
864 newlim -= newlim % pagesize;
865
-> 866 if (pagesize <= newlim - lim)
867 {
868 rlim.rlim_cur = newlim;
869 if (setrlimit (RLIMIT_STACK, &rlim) == 0)
Target 0: (Emacs) stopped.
(lldb) e newlim
(long) $17 = 67104768
(lldb) e newlim % pagesize
(long) $18 = 0
(lldb) e pagesize
(long) $19 = 4096
(lldb) e newlim - lim
(long) $20 = 0
(lldb) n
Process 96113 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x0000000100134085 Emacs`main(argc=2, argv=0x00007ffeefbff520) at emacs.c:872
869 if (setrlimit (RLIMIT_STACK, &rlim) == 0)
870 lim = newlim;
871 }
-> 872 }
873
874 /* Don't let regex.c overflow the stack. */
875 re_max_failures = lim < extra ? 0 : min (lim - extra, SIZE_MAX) / ratio;
Target 0: (Emacs) stopped.
(lldb) c
Process 96113 resuming
2018-10-02 14:11:54.227006-0700 Emacs[96113:1856908] MessageTracer: Falling back to default whitelist
2018-10-02 14:11:54.331905-0700 Emacs[96113:1900949] flock failed to lock maps file: errno = 35
2018-10-02 14:11:54.332259-0700 Emacs[96113:1900949] flock failed to lock maps file: errno = 35
Process 96113 exited with status = 0 (0x00000000)