Could someone with GCPRO expertise please review what I came up with.
I found this via crashes caused by
C-c p (toggle-profiling)
in a function that only ever uses barg seemed a clear typo.
However, I was still crashing after running with an XEmacs containing
the change to
So I sent on to protect the other argumetents as well.
I still saw crashes with this complete patch, but haven't used a
NEW_GC=0 XEmacs lately.
xemacs-21.5-clean source patch:
Diff command: cvs -f -z3 -q diff -u -w -N
Files affected: src/eval.c
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/eval.c,v
retrieving revision 1.92
diff -u -w -r1.92 eval.c
--- src/eval.c 27 Feb 2006 16:29:24 -0000 1.92
+++ src/eval.c 26 Mar 2006 22:33:46 -0000
＠＠ -1862,7 +1862,7 ＠＠
int speccount = specpdl_depth();
struct catchtag c;
- struct gcpro gcpro1, gcpro2, gcpro3;
+ struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
#if 0 /* FSFmacs */
c.tag = Qnil;
＠＠ -1920,12 +1920,12 ＠＠
Vcondition_handlers = c.tag;
- GCPRO1 (harg); /* Somebody has to gc-protect */
+ GCPRO2 (barg, c.val); /* Somebody has to gc-protect */
c.val = ((*bfun) (barg));
/* Once we change `catchlist' below, the stuff in c will not be GCPRO'd. */
- GCPRO3 (harg, c.val, c.tag);
+ GCPRO5 (harg, c.val, c.tag, c.actual_tag, c.backtrace);
catchlist = c.next;