Mon, 13 Dec 2004 15:43:57 +0900, Stephen J. Turnbull wrote:
Andrey> If i am saved the edited text(combination C-x C-s),
xemacs
Andrey> is hang. When i'm reverting this changes, xemacs is good
Andrey> working.
It's being looked at. You can revert locally if you like.
However, I
can't reproduce on Linux or Mac OS X, I can find nothing wrong with
the logic.
My system is FreeBSD 5.3-STABLE, gcc 3.4.
Please be aware that XEmacs without the patch is *broken*. The
patch
fixes a real bug that causes many regexps containing shy groups to
match incorrectly. Unfortunately there are many applications that use
shy groups; we cannot assume that they won't be present.
Until there are further reports or a developer can reproduce, the
situation is unlikely to change very quickly.
In the meantime, have you reproduced with xemacs -vanilla? This is
very important; there is an unrelated bug that causes infloops for
regexps that specify a repeated zero-length match. This bug is not
yet fixed. So you may have a save-hook that invokes such a regexp.
This is not reproduced, when i am started xemacs with -vanilla
options.
Can you get a backtrace for the hang?
1. Set debug-on-quit on before saving, then C-g at hang should give a
trace.
No, C-g is not stopping xemacs.
See this:
anray@santinel:~$ ps aux|grep xemacs|grep -v grep
anray 41548 85,4 10,8 32300 27032 p1 R+ 0:54 0:39,41 xemacs
85% CPU!
2. Run XEmacs under the debugger, hang XEmacs, suspend XEmacs, then
use the
debugger to get a C backtrace.
anray@santinel:~$ gdb /usr/local/bin/xemacs-21.4.16
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
(gdb) run
Starting program: /usr/local/bin/xemacs-21.4.16
^Z
Program received signal SIGTSTP, Stopped (user).
0x0813faea in lisp_buffer_reader (stream=0x288fd7ff,
data=0x8c2342b "le: \")\n (let* ((here (point))\n (name (if
(string-match \".*/$\" fullname)\n", ' ' <repeats 19 times>,
"(substring fullname 0 -1)\n\t\t fullname))\n (suffix (file-name-nondirectory
name))\n (fi"..., size=0) at buffer.h:642
642 {
(gdb) bt
#0 0x0813faea in lisp_buffer_reader (stream=0x288fd7ff,
data=0x8c2342b "le: \")\n (let* ((here (point))\n (name (if
(string-match \".*/$\" fullname)\n", ' ' <repeats 19 times>,
"(substring fullname 0 -1)\n\t\t fullname))\n (suffix (file-name-nondirectory
name))\n (fi"..., size=0) at buffer.h:642
#1 0x0813e7ec in Lstream_read (lstr=0x8c6e780, data=0xbfbfcd10, size=1)
at lstream.c:518
#2 0x080fee04 in Fwrite_region_internal (start=3, end=72579,
filename=145266292, append=136443908, visit=4096, lockname=145266084,
codesys=142326144) at fileio.c:3642
#3 0x080b1b95 in Ffuncall (nargs=8, args=0x7) at eval.c:3536
#4 0x0808c21d in execute_optimized_program (program=0x288fd7ff "",
stack_depth=146945067, constants_data=0x8795290) at bytecode.c:748
#5 0x0808e1ab in funcall_compiled_function (fun=142217304, nargs=6,
args=0xbfbfe068) at bytecode.c:516
#4 0x0808c21d in execute_optimized_program (program=0x288fd7ff "",
stack_depth=146945067, constants_data=0x8795290) at bytecode.c:748
#5 0x0808e1ab in funcall_compiled_function (fun=142217304, nargs=6,
args=0xbfbfe068) at bytecode.c:516
#6 0x080b1ab9 in Ffuncall (nargs=7, args=0xbfbfe064) at eval.c:3572
#7 0x0808c21d in execute_optimized_program (program=0x288fd7ff "",
stack_depth=146945067, constants_data=0x8707950) at bytecode.c:748
#8 0x0808e1ab in funcall_compiled_function (fun=141555376, nargs=2,
args=0xbfbfe1e8) at bytecode.c:516
#9 0x080b1ab9 in Ffuncall (nargs=3, args=0xbfbfe1e4) at eval.c:3572
#10 0x0808c21d in execute_optimized_program (program=0x288fd7ff "",
stack_depth=146945067, constants_data=0x870c910) at bytecode.c:748
---Type <return> to continue, or q <return> to quit---
#11 0x0808e1ab in funcall_compiled_function (fun=141555460, nargs=0,
args=0xbfbfe358) at bytecode.c:516
#12 0x080b1ab9 in Ffuncall (nargs=1, args=0xbfbfe354) at eval.c:3572
#13 0x0808c21d in execute_optimized_program (program=0x288fd7ff "",
stack_depth=146945067, constants_data=0x870ca10) at bytecode.c:748
#14 0x0808e1ab in funcall_compiled_function (fun=141555432, nargs=0,
args=0xbfbfe4c8) at bytecode.c:516
#15 0x080b1ab9 in Ffuncall (nargs=1, args=0xbfbfe4c4) at eval.c:3572
#16 0x0808c21d in execute_optimized_program (program=0x288fd7ff "",
stack_depth=146945067, constants_data=0x870ef90) at bytecode.c:748
#17 0x0808e1ab in funcall_compiled_function (fun=141555320, nargs=1,
args=0xbfbfe644) at bytecode.c:516
#18 0x080b1ab9 in Ffuncall (nargs=2, args=0xbfbfe640) at eval.c:3572
#19 0x0808f8aa in Fcall_interactively (function=141241956,
record_flag=136443908, keys=136443908) at callint.c:941
#20 0x080b3150 in Fcommand_execute (cmd=141241956, record_flag=680515583,
keys=680515583) at eval.c:2974
#21 0x080ea3f3 in execute_command_event (command_builder=0x85f8180,
event=151427308) at event-stream.c:3924
#22 0x080ea77f in Fdispatch_event (event=151427308) at event-stream.c:4258
#23 0x08095df4 in Fcommand_loop_1 () at cmdloop.c:583
#24 0x080aee0c in condition_case_1 (handlers=680515583,
bfun=0x8095e80 <command_loop_1>, barg=136443908,
---Type <return> to continue, or q <return> to quit---
hfun=0x8095750 <cmd_error>, harg=136443908) at eval.c:1652
#25 0x0809593a in command_loop_2 (dummy=136443908) at cmdloop.c:256
#26 0x080acd29 in internal_catch (tag=680515583,
func=0x8095900 <command_loop_2>, arg=136443908, threw=0x0) at eval.c:1318
#27 0x08095a9d in initial_command_loop (load_me=680515583) at cmdloop.c:305
#28 0x080abe75 in xemacs_21_4_16_i386__freebsd (argc=1, argv=0xbfbfeb00,
envp=0xbfbfeb08, restart=0) at emacs.c:2460
#29 0x080ac8d7 in main (argc=680515583, argv=0x288fd7ff, envp=0x288fd7ff)
at emacs.c:2892
3. If 1 didn't work, then at this point "ldp" should
give a backtrace,
too.
What is "ldp"?
Are you running an XEmacs built from a fresh checkout?
I am using the xemacs-21.4.16 official source packages:
MD5 (xemacs/xemacs-21.4.16-src.tar.gz) = 547f0dacceacfe013a1cee21bc0e859e
SIZE (xemacs/xemacs-21.4.16-src.tar.gz) = 8315419
MD5 (xemacs/xemacs-21.4.16-elc.tar.gz) = daa608da30d3b75dbcb59befe8c1a3c6
SIZE (xemacs/xemacs-21.4.16-elc.tar.gz) = 931295
MD5 (xemacs/xemacs-21.4.16-info.tar.gz) = 2af10831789ab70ba866f2660263ff08
SIZE (xemacs/xemacs-21.4.16-info.tar.gz) = 1632145
Is it possible that you are missing a patch? (There were _two_
patches related to this, the first fixed most of the bug, and the
second picked up a hunk that somehow got dropped from the first
patch).
This patch is fixed hang:
Index: regex.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/regex.c,v
retrieving revision 1.25.2.10
retrieving revision 1.25.2.9
diff -u -r1.25.2.10 -r1.25.2.9
--- src/regex.c 2004/10/08 00:40:33 1.25.2.10
+++ src/regex.c 2004/09/23 03:03:43 1.25.2.9
@@ -4766,20 +4766,16 @@
/* Go through the first `min (num_regs, regs->num_regs)'
registers, since that is all we initialized. */
- for (mcnt = 1;
- mcnt < MIN (num_nonshy_regs, regs->num_regs);
- mcnt++)
+ for (mcnt = 1; mcnt < MIN (num_regs, regs->num_regs); mcnt++)
{
- int ireg = bufp->external_to_internal_register[mcnt];
-
- if (REG_UNSET (regstart[ireg]) || REG_UNSET (regend[ireg]))
+ if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
regs->start[mcnt] = regs->end[mcnt] = -1;
else
{
regs->start[mcnt]
- = (regoff_t) POINTER_TO_OFFSET (regstart[ireg]);
+ = (regoff_t) POINTER_TO_OFFSET (regstart[mcnt]);
regs->end[mcnt]
- = (regoff_t) POINTER_TO_OFFSET (regend[ireg]);
+ = (regoff_t) POINTER_TO_OFFSET (regend[mcnt]);
}
}
} /* regs && !bufp->no_sub */
--
Regards,
Andrey.