SL Baur <steve(a)xemacs.org> writes:
Gunnar Evermann
<Gunnar.Evermann(a)nats.informatik.uni-hamburg.de> writes in xemacs-beta(a)xemacs.org:
> try this with "Benadir":
> - xemacs -vanilla
> - C-h k
> - click on the Options/Fonts menu entry (generating the list of fonts)
> and wait for the submenu to pop up
> - click somewhere in the window outside the menus
> - watch XEmacs dump core.
Reproduced with 21.0. Cannot reproduce in 20.4.
Hm, indeed same here, but then here on my sun "Benadir" doesn't crash
either -- strange...
If there are still problems, the 20.4 code is likely to be
enlightening.
Not really, I don't see a significant change in the source.
I only protected the prompt in the '[kK]' cases, in all the others
callN is used and provides the gcpro. This violates 'caller protects'
but I guess that's acceptable here.
BTW, the nested version of GCPRO isn't documented in the internals
manual. I only found it by chance in lisp.h. I'll send a patch for
internals.texi later this week.
Anyway here's the patch:
1998-07-27 Gunnar Evermann <Gunnar.Evermann(a)nats.informatik.uni-hamburg.de>
* callint.c (Fcall_interactively): GCPRO prompt string before
passing it to Fread_key_sequence
--- callint.c.orig-21.0-b50 Wed May 6 11:46:26 1998
+++ callint.c Mon Jul 27 12:22:26 1998
@@ -715,7 +715,14 @@
}
case 'k': /* Key sequence (vector of events) */
{
- Lisp_Object tem = Fread_key_sequence (PROMPT (), Qnil, Qnil);
+ struct gcpro ngcpro1;
+ Lisp_Object tem;
+ Lisp_Object key_prompt = PROMPT ();
+
+ NGCPRO1(key_prompt);
+ tem = Fread_key_sequence (key_prompt, Qnil, Qnil);
+ NUNGCPRO;
+
visargs[argnum] = Fkey_description (tem);
/* The following makes `describe-key' not work with
extent-local keymaps and such; and anyway, it's
@@ -728,7 +735,14 @@
case 'K': /* Key sequence (vector of events),
no automatic downcasing */
{
- Lisp_Object tem = Fread_key_sequence (PROMPT (), Qnil, Qt);
+ struct gcpro ngcpro1;
+ Lisp_Object tem;
+ Lisp_Object key_prompt = PROMPT ();
+
+ NGCPRO1(key_prompt);
+ tem = Fread_key_sequence (key_prompt, Qnil, Qt);
+ NUNGCPRO;
+
visargs[argnum] = Fkey_description (tem);
/* The following makes `describe-key' not work with
extent-local keymaps and such; and anyway, it's