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

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

Re: stack overflow while using sml-mode.el


From: Colin Walters
Subject: Re: stack overflow while using sml-mode.el
Date: 23 Oct 2000 08:39:18 -0400
User-agent: Microsoft Gnus Express, Build 5.0808 (5.8.8)

Eli Zaretskii <address@hidden> writes:

> On 22 Oct 2000, Colin Walters wrote:
> 
> > I'm having a strange problem where Emacs will overflow the stack in
> > alloc.c, while using sml-mode.el, by Stefan Monnier.
> 
> How do you know it's a stack overflow?  In the data you presented
> from the GDB session, I don't see anything that would indicate it's
> a stack problem; it could be just a SIGSEGV.

Well, because the stack had 2910 frames on it, with the first 1500
being inside mark_object.  I assume the root cause of the bug isn't in
the garbage collector, but I don't think that's a normal number of
recursive calls.

>  (gdb) p ptr
>  $6 = (struct Lisp_String *) 0x8366eb4
>  (gdb) p *(struct Lisp_String *) 0x8366eb4

As per Stefan's advice, I did:

(gdb) p *ptr
$13 = {
  size = 18, 
  size_byte = 404740268, 
  intervals = 0x181fd8ac, 
  data = "|"
}

> Can you find out what exactly was Emacs doing when it crashed (apart
> of GC)?  Was it, per chance, matching a complicated regexp?

Ok, here's a summary of the stack:

frames 0-1538: mark_object
frames 1539-1543: traverse_intervals
frame 1544: mark_interval_tree
frames 1545-2381: mark_object
frame 2382: mark_interval
frames 2383-2387: traverse_intervals
frame 2388: mark_interval_tree
frame 2389: mark_buffer
frames 2390-2397: mark_object
frame 2397: mark_buffer
frames 2398-2631: mark_object
frame 2632-2636: traverse_intervals
frame 2637: mark_interval_tree
frame 2638: mark_buffer
frames 2639-2761: mark_object

At this point, it starts to get more complicated:

#2762 0x80df27f in Fgarbage_collect () at alloc.c:1826
#2763 0x811af12 in Fbyte_code (bytestr=943631372, vector=1212191208, 
    maxdepth=5) at bytecode.c:458
#2764 0x80f137b in funcall_lambda (fun=1212000744, nargs=2, 
    arg_vector=0xbfffb770) at eval.c:2654
#2765 0x80f0eec in Ffuncall (nargs=3, args=0xbfffb76c) at eval.c:2524
#2766 0x811ae8e in Fbyte_code (bytestr=943630924, vector=1212191088, 
    maxdepth=7) at bytecode.c:433
#2767 0x80f137b in funcall_lambda (fun=1212003320, nargs=1, 
    arg_vector=0xbfffb890) at eval.c:2654
#2768 0x80f0eec in Ffuncall (nargs=2, args=0xbfffb88c) at eval.c:2524
#2769 0x811ae8e in Fbyte_code (bytestr=943630924, vector=1212191088, 
    maxdepth=7) at bytecode.c:433
#2770 0x80f137b in funcall_lambda (fun=1212003320, nargs=1, 
    arg_vector=0xbfffb9b0) at eval.c:2654
#2771 0x80f0eec in Ffuncall (nargs=2, args=0xbfffb9ac) at eval.c:2524
#2772 0x811ae8e in Fbyte_code (bytestr=943630924, vector=1212191088, 
    maxdepth=7) at bytecode.c:433
#2773 0x80f137b in funcall_lambda (fun=1212003320, nargs=1, 
    arg_vector=0xbfffbad0) at eval.c:2654
#2774 0x80f0eec in Ffuncall (nargs=2, args=0xbfffbacc) at eval.c:2524
#2775 0x811ae8e in Fbyte_code (bytestr=943630924, vector=1212191088, 
    maxdepth=7) at bytecode.c:433
#2776 0x80f137b in funcall_lambda (fun=1212003320, nargs=1, 
    arg_vector=0xbfffbbf0) at eval.c:2654
#2777 0x80f0eec in Ffuncall (nargs=2, args=0xbfffbbec) at eval.c:2524
#2778 0x811ae8e in Fbyte_code (bytestr=943630872, vector=1212013072, 
    maxdepth=2) at bytecode.c:433
#2779 0x80f137b in funcall_lambda (fun=1212012032, nargs=1, 
    arg_vector=0xbfffbd70) at eval.c:2654
#2780 0x80f0eec in Ffuncall (nargs=2, args=0xbfffbd6c) at eval.c:2524
#2781 0x80f0402 in Fapply (nargs=2, args=0xbfffbd6c) at eval.c:1930
#2782 0x80f0973 in apply1 (fn=1212012032, arg=1483620868) at eval.c:2231
#2783 0x80f0287 in Feval (form=1483622852) at eval.c:1881
#2784 0x80eddea in Fprogn (args=1483622844) at eval.c:365
#2785 0x80ee879 in Flet (args=1483620876) at eval.c:771
#2786 0x80eff09 in Feval (form=1483620924) at eval.c:1772
#2787 0x80eddea in Fprogn (args=1483622836) at eval.c:365
#2788 0x80f130a in funcall_lambda (fun=1483622828, nargs=1, 
    arg_vector=0xbfffc0fc) at eval.c:2647
#2789 0x80f0eec in Ffuncall (nargs=2, args=0xbfffc0f8) at eval.c:2524
#2790 0x80f0402 in Fapply (nargs=2, args=0xbfffc0f8) at eval.c:1930
#2791 0x80f0973 in apply1 (fn=1483622828, arg=1483771780) at eval.c:2231
#2792 0x80f0287 in Feval (form=1483771788) at eval.c:1881
#2793 0x80f0054 in Feval (form=1483771804) at eval.c:1810
#2794 0x80edc27 in Fif (args=1483771756) at eval.c:294
#2795 0x80eff09 in Feval (form=1483771812) at eval.c:1772
#2796 0x80eddea in Fprogn (args=1483771820) at eval.c:365
#2797 0x80ee879 in Flet (args=1483771836) at eval.c:771
#2798 0x80eff09 in Feval (form=1483771876) at eval.c:1772
#2799 0x80eddea in Fprogn (args=1484369836) at eval.c:365
#2800 0x80eff09 in Feval (form=1484369844) at eval.c:1772
#2801 0x80edc7d in Fif (args=1484369860) at eval.c:298
#2802 0x80eff09 in Feval (form=1484369868) at eval.c:1772
#2803 0x80f028d in Feval (form=1483771892) at eval.c:1881
#2804 0x80eddea in Fprogn (args=1483933868) at eval.c:365
#2805 0x80ee879 in Flet (args=1483771900) at eval.c:771
#2806 0x80eff09 in Feval (form=1483771972) at eval.c:1772
#2807 0x80eddea in Fprogn (args=1483933860) at eval.c:365
#2808 0x80f130a in funcall_lambda (fun=1483933852, nargs=0, 
    arg_vector=0xbfffc944) at eval.c:2647
#2809 0x80f10a6 in apply_lambda (fun=1483933852, args=404740244, eval_flag=1)
    at eval.c:2578
#2810 0x80f02ac in Feval (form=1483935956) at eval.c:1883
#2811 0x80ee61d in FletX (args=1483939788) at eval.c:708
#2812 0x80eff09 in Feval (form=1483936444) at eval.c:1772
#2813 0x80eddea in Fprogn (args=1483936468) at eval.c:365
#2814 0x80ee879 in Flet (args=1483933700) at eval.c:771
#2815 0x80eff09 in Feval (form=1483933756) at eval.c:1772
#2816 0x80eddea in Fprogn (args=1483933764) at eval.c:365
#2817 0x80f130a in funcall_lambda (fun=1483702220, nargs=1, 
    arg_vector=0xbfffcd64) at eval.c:2647
#2818 0x80f10a6 in apply_lambda (fun=1483702220, args=1483702388, eval_flag=1)
    at eval.c:2578
#2819 0x80f02ac in Feval (form=1483702396) at eval.c:1883
#2820 0x80eddea in Fprogn (args=1484367812) at eval.c:365
#2821 0x80eff09 in Feval (form=1484368516) at eval.c:1772
#2822 0x80ee7cb in Flet (args=1484368612) at eval.c:755
#2823 0x80eff09 in Feval (form=1484368620) at eval.c:1772
#2824 0x80f028d in Feval (form=1483702404) at eval.c:1881
#2825 0x80ee93a in Fwhile (args=1483702372) at eval.c:790
#2826 0x80eff09 in Feval (form=1483702412) at eval.c:1772
#2827 0x80eddea in Fprogn (args=1483702364) at eval.c:365
#2828 0x80edd0e in Fcond (args=1483702324) at eval.c:326
#2829 0x80eff09 in Feval (form=1483939780) at eval.c:1772
#2830 0x80eddea in Fprogn (args=1483702244) at eval.c:365
#2831 0x80ee674 in FletX (args=1483939788) at eval.c:714
#2832 0x80eff09 in Feval (form=1483936444) at eval.c:1772
#2833 0x80eddea in Fprogn (args=1483936468) at eval.c:365
#2834 0x80ee879 in Flet (args=1483933700) at eval.c:771
#2835 0x80eff09 in Feval (form=1483933756) at eval.c:1772
#2836 0x80eddea in Fprogn (args=1483933764) at eval.c:365
#2837 0x80f130a in funcall_lambda (fun=1483702220, nargs=1, 
    arg_vector=0xbfffd6a4) at eval.c:2647
#2838 0x80f10a6 in apply_lambda (fun=1483702220, args=1483969836, eval_flag=1)
    at eval.c:2578
#2839 0x80f02ac in Feval (form=1483969828) at eval.c:1883
#2840 0x80eddea in Fprogn (args=1483969844) at eval.c:365
#2841 0x80eff09 in Feval (form=1483969820) at eval.c:1772
#2842 0x80ee93a in Fwhile (args=1483969988) at eval.c:790
#2843 0x80eff09 in Feval (form=1483969812) at eval.c:1772
#2844 0x80eddea in Fprogn (args=1484245236) at eval.c:365
#2845 0x80eff09 in Feval (form=1484245244) at eval.c:1772
#2846 0x80eef5e in Fcondition_case (args=1484245268) at eval.c:1099
#2847 0x80eff09 in Feval (form=1484245276) at eval.c:1772
#2848 0x80f028d in Feval (form=1483969804) at eval.c:1881
#2849 0x80eddea in Fprogn (args=1483970052) at eval.c:365
#2850 0x80ee879 in Flet (args=1483969796) at eval.c:771
#2851 0x80eff09 in Feval (form=1483969780) at eval.c:1772
#2852 0x80eddea in Fprogn (args=1483970060) at eval.c:365
#2853 0x80f130a in funcall_lambda (fun=1483970068, nargs=1, 
    arg_vector=0xbfffdef4) at eval.c:2647
#2854 0x80f10a6 in apply_lambda (fun=1483970068, args=1483985396, eval_flag=1)
    at eval.c:2578
#2855 0x80f02ac in Feval (form=1483985388) at eval.c:1883
#2856 0x80eddea in Fprogn (args=1483985404) at eval.c:365
#2857 0x80edc59 in Fif (args=1483985356) at eval.c:299
#2858 0x80eff09 in Feval (form=1483985348) at eval.c:1772
#2859 0x80eddea in Fprogn (args=1483985428) at eval.c:365
#2860 0x80ee879 in Flet (args=1483985340) at eval.c:771
#2861 0x80eff09 in Feval (form=1483985236) at eval.c:1772
#2862 0x80edbb9 in Fand (args=1483985228) at eval.c:271
#2863 0x80eff09 in Feval (form=1483985172) at eval.c:1772
#2864 0x80edb36 in For (args=1483984700) at eval.c:241
#2865 0x80eff09 in Feval (form=1483984564) at eval.c:1772
#2866 0x80eddea in Fprogn (args=1483985548) at eval.c:365
#2867 0x80ee879 in Flet (args=1483984556) at eval.c:771
#2868 0x80eff09 in Feval (form=1483984460) at eval.c:1772
#2869 0x80eddea in Fprogn (args=1484241196) at eval.c:365
#2870 0x80eff09 in Feval (form=1484241204) at eval.c:1772
#2871 0x80eed4c in Funwind_protect (args=1484241236) at eval.c:1014
#2872 0x80eff09 in Feval (form=1484241244) at eval.c:1772
#2873 0x80eddea in Fprogn (args=1484241252) at eval.c:365
#2874 0x80ee879 in Flet (args=1484241260) at eval.c:771
#2875 0x80eff09 in Feval (form=1484241268) at eval.c:1772
#2876 0x80f028d in Feval (form=1483984396) at eval.c:1881
#2877 0x80eddea in Fprogn (args=1483984364) at eval.c:365
#2878 0x80e73d3 in Fsave_excursion (args=1483984364) at editfns.c:411
#2879 0x80eff09 in Feval (form=1483984348) at eval.c:1772
#2880 0x80eddea in Fprogn (args=1483985572) at eval.c:365
#2881 0x80f130a in funcall_lambda (fun=1483985580, nargs=0, 
    arg_vector=0xbfffeba4) at eval.c:2647
#2882 0x80f10a6 in apply_lambda (fun=1483985580, args=404740244, eval_flag=1)
    at eval.c:2578
#2883 0x80f02ac in Feval (form=1483983044) at eval.c:1883
#2884 0x80eddea in Fprogn (args=1484239716) at eval.c:365
#2885 0x80eff09 in Feval (form=1484239724) at eval.c:1772
#2886 0x80eef5e in Fcondition_case (args=1484239748) at eval.c:1099
#2887 0x80eff09 in Feval (form=1484239756) at eval.c:1772
#2888 0x80f028d in Feval (form=1483983036) at eval.c:1881
#2889 0x80edb36 in For (args=1483983060) at eval.c:241

#2890 0x80eff09 in Feval (form=1483983028) at eval.c:1772
#2891 0x80eff94 in Feval (form=1483983020) at eval.c:1790
#2892 0x80ee7cb in Flet (args=1483983108) at eval.c:755
#2893 0x80eff09 in Feval (form=1483982940) at eval.c:1772
#2894 0x80eddea in Fprogn (args=1483982916) at eval.c:365
#2895 0x80f130a in funcall_lambda (fun=1483983212, nargs=0, 
    arg_vector=0xbffff3c8) at eval.c:2647
#2896 0x80f0eec in Ffuncall (nargs=1, args=0xbffff3c4) at eval.c:2524
#2897 0x811ae8e in Fbyte_code (bytestr=941146644, vector=1209582136, 
    maxdepth=2) at bytecode.c:433
#2898 0x80f137b in funcall_lambda (fun=1209582052, nargs=1, 
    arg_vector=0xbffff518) at eval.c:2654
#2899 0x80f0eec in Ffuncall (nargs=2, args=0xbffff514) at eval.c:2524
#2900 0x80ed648 in Fcall_interactively (function=405330764, 
    record_flag=404740244, keys=1210148216) at callint.c:790
#2901 0x80a0d51 in Fcommand_execute (cmd=405330764, record_flag=404740244, 
    keys=404740244, special=404740244) at keyboard.c:7984
#2902 0x8099252 in command_loop_1 () at keyboard.c:1502
#2903 0x80ef04d in internal_condition_case (bfun=0x8098630 <command_loop_1>, 
    handlers=404740748, hfun=0x80982b4 <cmd_error>) at eval.c:1150
#2904 0x8098508 in command_loop_2 () at keyboard.c:1093
#2905 0x80eebeb in internal_catch (tag=404740724, 
    func=0x80984e4 <command_loop_2>, arg=404740244) at eval.c:925
#2906 0x80984b2 in command_loop () at keyboard.c:1072
#2907 0x80980ed in recursive_edit_1 () at keyboard.c:821
#2908 0x80981e5 in Frecursive_edit () at keyboard.c:869
#2909 0x80972ce in main (argc=3, argv=0xbffffc64, envp=0xbffffc74)
    at emacs.c:1361
#2910 0x401f3bcc in __libc_start_main () from /lib/libc.so.6



reply via email to

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