-- xemacs-beta(a)xemacs.org spake thusly:
-- Norbert Koch <nk(a)LF.net> spake thusly:
> Norbert Koch <nk(a)LF.net> writes:
>
>> I was trying to remove a region in gnus when seeing this
>> "behaviour":
>>
>> "XEmacs 21.2 (beta44) \"Thalia\" [Lucid]
(i386-unknown-freebsd3.3,
>> Mule) of Tue Feb 20 2001 on lamia.LF.net"
>>
>> This includes Matt's recent patches.
>
> This is easily reproduced:
>
> xemacs -vanilla
>
> mark the three lines of comment in the scratch buffer
>
> C-w
>
> and be done with it.
This seems to occur only when building with --use-union-type and
zmacs-regions are disabled. This doesn't seem to be crashing anywhere
near my code, but that doesn't necessarily mean anything. Since I'm
(finally) able to reproduce it, I'll look at it sometime today or
tonight.
After a preliminary look at this, I'm almost positive it's not my bug.
I tracked it down to the following loop in callint.c (line 932):
/* If we used a marker to hold point, mark, or an end of the region,
temporarily, convert it to an integer now. */
for (argnum = 0; argnum < argcount; argnum++)
if (!NILP (varies[argnum]))
XSETINT (args[argnum], marker_position (args[argnum]));
The XSETINT line is the one that crashes, with the following backtrace:
#4 0x80bed0b in assert_failed (file=0x8274a20
"/usr/local/src/xemacs-21.2/src/lisp.h",
line=1397, expr=0x8274ba0 "RECORD_TYPEP (obj, lrecord_type_marker)")
at /usr/local/src/xemacs-21.2/src/emacs.c:3214
#5 0x818723f in marker_position (...)
at /usr/local/src/xemacs-21.2/src/lisp.h:1397
#6 0x809a34e in Fcall_interactively (...)
at /usr/local/src/xemacs-21.2/src/callint.c:936
The following patch fixes the crash, but don't ask me why:
Index: callint.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/callint.c,v
retrieving revision 1.12.2.8
diff -u -r1.12.2.8 callint.c
--- callint.c 2000/11/13 09:00:30 1.12.2.8
+++ callint.c 2001/02/21 03:08:42
@@ -933,7 +933,10 @@
temporarily, convert it to an integer now. */
for (argnum = 0; argnum < argcount; argnum++)
if (!NILP (varies[argnum]))
- XSETINT (args[argnum], marker_position (args[argnum]));
+ {
+ Bufpos tmp = marker_position (args[argnum]);
+ XSETINT (args[argnum], tmp);
+ }
single_console_state ();
specbind (Qcommand_debug_status, Qnil);
I'm not going to commit this, since I'm not certain it's the right
thing to do. Perhaps someone with a little more experience with this
code than I have can offer an opinion?