Hrvoje Niksic <hniksic(a)arsdigita.com> writes:
Gunnar Evermann <ge204(a)eng.cam.ac.uk> writes:
> > - Lisp_Object handler;
> > + Lisp_Object handler = Qnil;
>
> out of interest, is this always neccessary?
The initialization necessary only because of the newly introduced
GCPRO on that variable. GCPRO (foo) declares that the Lisp object
pointed to by &foo is a "root of accessibility", which means that it
will be marked in the mark phase of GC. If you don't initialize it,
the GC code will try to dereference random garbage and set the mark
bit there, leading to a crash.
Yes, that's what I realised after writing the question and meant by
"Hm, I guess it is". We should automatically check whether we always
do this. Maybe in debug_gcpro().
Ray, I have another patch for you. I think this one matches the
symptoms of the crash better than Martin's (no offence). We crash
right after the GCPRO in lock_file() and try to mark_object(0).
Sorry, no ChangeLog, etc. and linenumber might be off. I am in a hurry
right now.
Gunnar
--- filelock.c~ Wed Nov 8 11:20:49 2000
+++ filelock.c Thu Nov 16 13:28:37 2000
@@ -313,8 +313,8 @@
register char *lfname, *locker;
lock_info_type lock_info;
struct gcpro gcpro1, gcpro2, gcpro3;
- Lisp_Object old_current_buffer;
- Lisp_Object subject_buf;
+ Lisp_Object old_current_buffer = Qnil;
+ Lisp_Object subject_buf = Qnil;
if (inhibit_clash_detection)
return;