I've seen these crashes for a long time in XEmacs 21.5, which kept me
from using
C-c p (toggle-profiling)
This trivial patch cures the symptom for me, but I wonder:
Are others seeing this as well?
Is this the right fix?
Best regards!
Adrian
xemacs-21.5-clean ChangeLog patch:
Diff command: cvs -q diff -U 0
Files affected: src/ChangeLog
Index: src/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.997
diff -u -U0 -r1.997 ChangeLog
--- src/ChangeLog 8 Aug 2006 15:26:05 -0000 1.997
+++ src/ChangeLog 15 Aug 2006 17:17:58 -0000
@@ -0,0 +1,9 @@
+2006-08-15 Adrian Aichner <adrian(a)xemacs.org>
+
+ * profile.c (profile_reap_backtrace): Only dereference function
+ pointer, if not NULL.
+
xemacs-21.5-clean source patch:
Diff command: cvs -f -z3 -q diff -u -w -N
Files affected: src/profile.c
===================================================================
RCS
Index: src/profile.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/profile.c,v
retrieving revision 1.25
diff -u -w -r1.25 profile.c
--- src/profile.c 10 Mar 2005 09:12:38 -0000 1.25
+++ src/profile.c 15 Aug 2006 17:16:27 -0000
@@ -253,6 +253,7 @@
handler will record more ticks for the function while the post-amble
is executing, and its value will be > our total value. */
bt->function_being_called = 0;
+ if (bt->function != NULL) {
Fputhash (*bt->function,
/* This works even when the total_ticks value has overwrapped.
Same for total_consing below. */
@@ -265,6 +266,7 @@
+ bt->current_total_gc_usage_val),
Vtotal_gc_usage_profile_table);
}
+}
void
profile_record_just_called (struct backtrace *bt)
--
Adrian Aichner
mailto:adrian@xemacs.org
http://www.xemacs.org/