Hi All!
Could someone with GCPRO expertise please review what I came up with.
I found this via crashes caused by
C-c p (toggle-profiling)
with NEW_GC=0
GCPRO1 (harg);
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
GCPRO1 (barg);
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.
Please advise,
Adrian
xemacs-21.5-clean source patch:
Diff command: cvs -f -z3 -q diff -u -w -N
Files affected: src/eval.c
Index: 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 @@
#else
Vcondition_handlers = c.tag;
#endif
- GCPRO1 (harg); /* Somebody has to gc-protect */
+ GCPRO2 (barg, c.val); /* Somebody has to gc-protect */
c.val = ((*bfun) (barg));
UNGCPRO;
/* 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;
check_catchlist_sanity ();
--
Adrian Aichner
mailto:adrian@xemacs.org
http://www.xemacs.org/