emacs-devel
[Top][All Lists]
Advanced

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

Re: tramp and diff-mode results in Emacs crash


From: Chong Yidong
Subject: Re: tramp and diff-mode results in Emacs crash
Date: Wed, 28 Feb 2007 11:28:10 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> Oh, wait, you're saying that the problem is that when
> combine-after-change-execute is run it begins by calling lock_file, which
> causes more changes?  Hmm... I still don't see why that would be a problem.
> Can you show some backtraces?

I couldn't get Emacs to crash, but here is a backtrace from a
breakpoint just before Emacs gets confused.

Basically, insert_from_string calls prepare_to_modify_buffer before
signal_after_change (the latter is supposed to signal the changes due
to the insertion).  But prepare_to_modify_buffer calls lock_file,
which calls the Tramp file handlers, which does its own insertion in a
temp buffer, which runs signal_after_change, which first runs
signal_after_change on the original buffer---all this happens *before*
signal_before_change on the original buffer gets to run!

This analysis indicates that the more general solution is to bind
inhibit_modification_hooks around the call to lock_file in
prepare_to_modify_buffer, but that seems to me too risky a change at
this stage in the release.

#0  signal_after_change (charpos=1, lendel=0, lenins=12) at insdel.c:2257
#1  0x0811a625 in insert_from_string (string=141595915, pos=0, pos_byte=0, 
    length=12, length_byte=12, inherit=0) at insdel.c:1069
#2  0x08153f7d in general_insert_function (insert_func=0x811aab0 <insert>, 
    insert_from_string_func=0x811a5a0 <insert_from_string>, inherit=0, 
    nargs=1, args=0xbf89bd20) at editfns.c:2176
#3  0x081540b4 in Finsert (nargs=1, args=0xbf89bd20) at editfns.c:2220
#4  0x081874af in Fbyte_code (bytestr=141230795, vector=141367012, maxdepth=40)
    at bytecode.c:1258
#5  0x0815c2c7 in funcall_lambda (fun=141379860, nargs=2, 
    arg_vector=0xbf89be54) at eval.c:3184
#6  0x0815c711 in Ffuncall (nargs=3, args=0xbf89be50) at eval.c:3054
#7  0x0818793d in Fbyte_code (bytestr=141403235, vector=141259140, maxdepth=56)
    at bytecode.c:679
#8  0x0815c2c7 in funcall_lambda (fun=141142596, nargs=5, 
    arg_vector=0xbf89bf84) at eval.c:3184
#9  0x0815c711 in Ffuncall (nargs=6, args=0xbf89bf80) at eval.c:3054
#10 0x0818793d in Fbyte_code (bytestr=140040251, vector=139888212, maxdepth=80)
    at bytecode.c:679
#11 0x0815c2c7 in funcall_lambda (fun=140530676, nargs=2, 
    arg_vector=0xbf89c0c4) at eval.c:3184
#12 0x0815c711 in Ffuncall (nargs=3, args=0xbf89c0c0) at eval.c:3054
#13 0x0815e029 in Fapply (nargs=2, args=0xbf89c194) at eval.c:2485
#14 0x0815ca5a in Ffuncall (nargs=3, args=0xbf89c190) at eval.c:2978
#15 0x0818793d in Fbyte_code (bytestr=139878275, vector=141549748, maxdepth=32)
    at bytecode.c:679
#16 0x0815c2c7 in funcall_lambda (fun=141253452, nargs=3, 
    arg_vector=0xbf89c2b4) at eval.c:3184
#17 0x0815c711 in Ffuncall (nargs=4, args=0xbf89c2b0) at eval.c:3054
#18 0x0815e029 in Fapply (nargs=3, args=0xbf89c384) at eval.c:2485
#19 0x0815ca5a in Ffuncall (nargs=4, args=0xbf89c380) at eval.c:2978
#20 0x0818793d in Fbyte_code (bytestr=139878451, vector=141181604, maxdepth=32)
    at bytecode.c:679
#21 0x0815c2c7 in funcall_lambda (fun=139934292, nargs=3, 
    arg_vector=0xbf89c4a4) at eval.c:3184
#22 0x0815c711 in Ffuncall (nargs=4, args=0xbf89c4a0) at eval.c:3054
#23 0x0815cae9 in call3 (fn=138328817, arg1=137589513, arg2=141839179, 
    arg3=137472201) at eval.c:2827
#24 0x0812376c in Fexpand_file_name (name=141839179, 
    default_directory=137472201) at fileio.c:1721
#25 0x08117adc in lock_file (fn=141839179) at filelock.c:605
#26 0x0811869a in prepare_to_modify_buffer (start=1, end=1, preserve_ptr=0x0)
    at insdel.c:2085
#27 0x0811a2ec in insert_from_string_1 (string=<value optimized out>, pos=0, 
    pos_byte=0, nchars=3, nbytes=3, inherit=0, before_markers=0)
    at insdel.c:1121
#28 0x0811a607 in insert_from_string (string=139867003, pos=0, pos_byte=0, 
    length=3, length_byte=3, inherit=0) at insdel.c:1067
#29 0x08153f7d in general_insert_function (insert_func=0x811aab0 <insert>, 
    insert_from_string_func=0x811a5a0 <insert_from_string>, inherit=0, 
    nargs=1, args=0xbf89c660) at editfns.c:2176
#30 0x081540b4 in Finsert (nargs=1, args=0xbf89c660) at editfns.c:2220
#31 0x0815bf1b in Feval (form=138970861) at eval.c:2301
#32 0x0815c11f in Fprogn (args=137472201) at eval.c:447
#33 0x0815e755 in Flet (args=138970869) at eval.c:1064
#34 0x0815bf3d in Feval (form=138970901) at eval.c:2275
#35 0x0815c11f in Fprogn (args=137472201) at eval.c:447
#36 0x0815c3b4 in funcall_lambda (fun=138970784, nargs=0, 
    arg_vector=0xbf89c894) at eval.c:3177
#37 0x0815c711 in Ffuncall (nargs=1, args=0xbf89c890) at eval.c:3054
#38 0x0815e189 in apply1 (fn=138970789, arg=137472201) at eval.c:2738
#39 0x08159869 in Fcall_interactively (function=138970789, 
    record_flag=137472201, keys=137512716) at callint.c:406
#40 0x080f9313 in Fcommand_execute (cmd=138970789, record_flag=137472201, 
    keys=137472201, special=137472201) at keyboard.c:10014
#41 0x08104d39 in command_loop_1 () at keyboard.c:1873
#42 0x0815b2d2 in internal_condition_case (bfun=0x81049b0 <command_loop_1>, 
    handlers=137516857, hfun=0x80ff400 <cmd_error>) at eval.c:1481
#43 0x080fe7b3 in command_loop_2 () at keyboard.c:1329
---Type <return> to continue, or q <return> to quit---
#44 0x0815b38a in internal_catch (tag=137510841, 
    func=0x80fe790 <command_loop_2>, arg=137472201) at eval.c:1222
#45 0x080ff23c in command_loop () at keyboard.c:1308
#46 0x080ff5fa in recursive_edit_1 () at keyboard.c:1006
#47 0x080ff6e6 in Frecursive_edit () at keyboard.c:1067
#48 0x080f5405 in main (argc=3, argv=0xbf89d134) at emacs.c:1761

Lisp Backtrace:
"format-spec" (0x870950b)
"tramp-make-tramp-file-name" (0x831a8c9)
"tramp-handle-expand-file-name" (0x8744b4b)
"apply" (0x86fd461)
"tramp-sh-file-name-handler" (0x8337309)
"apply" (0x86fd9e1)
"tramp-file-name-handler" (0x8337309)
"insert" (0x856337b)
"let" (0x84886f5)
0x84886a5 Lisp type 5
"call-interactively" (0x84886a5)




reply via email to

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