From xemacs-m  Fri Jul 25 23:18:01 1997
Received: from mailbox2.ucsd.edu (mailbox2.ucsd.edu [132.239.1.54])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id XAA15086
	for <xemacs-beta@xemacs.org>; Fri, 25 Jul 1997 23:18:00 -0500 (CDT)
Received: from sdnp5.ucsd.edu (sdnp5.ucsd.edu [132.239.79.10]) by mailbox2.ucsd.edu (8.8.5/8.6.9) with SMTP id VAA03248 for <xemacs-beta@xemacs.org>; Fri, 25 Jul 1997 21:18:01 -0700 (PDT)
Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4)
	id VAA16945; Fri, 25 Jul 1997 21:17:28 -0700
To: XEmacs Beta Mailing List <xemacs-beta@xemacs.org>
Subject: [patch] crashes while loading elc files
References: <87n2nhe8mr.fsf@bittersweet.inetarena.com>
X-Face: "oX;zS#-JU$-,WKSzG.1gGE]x^cIg!hW.dq>.f6pzS^A+(k!T|M:}5{_%>Io<>L&{hO7W4cicOQ|>/lZ1G(m%7iaCf,6Qgk0%%Bz7b2-W3jd0m_UG\Y;?]}4s0O-U)uox>P3JN)9cm]O\@,vy2e{`3pb!"pqmRy3peB90*2L
Mail-Copies-To: never
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: multipart/mixed;
 boundary="Multipart_Fri_Jul_25_21:17:27_1997-1"
Content-Transfer-Encoding: 7bit
From: David Moore <dmoore@ucsd.edu>
Date: 25 Jul 1997 21:17:28 -0700
In-Reply-To: karlheg+xemacs@inetarena.com's message of "20 Jul 1997 14:06:20 -0700"
Message-ID: <rvafja4fc7.fsf@sdnp5.ucsd.edu>
Lines: 46
X-Mailer: Gnus v5.4.63/XEmacs 20.3(beta14) - "Vienna"

--Multipart_Fri_Jul_25_21:17:27_1997-1
Content-Type: text/plain; charset=US-ASCII

karlheg+xemacs@inetarena.com (Karl M. Hegbloom) writes:

> Fatal error: assertion failed, file bytecode.h, line 76, RECORD_TYPEP (_obj, lrecord_compiled_function) || MARKED_RECORD_P (_obj)

> #5  0x810442d in read_compiled_function (readcharfun=409067008, terminator=93)
>     at lread.c:2918

Also, same crash from Jens-Ulrik Holger Petersen.  Both due to having
file handlers installed (dired) which gc'd at a bad time.


--Multipart_Fri_Jul_25_21:17:27_1997-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="alloc.diff"
Content-Transfer-Encoding: 7bit

--- ChangeLog.orig	Fri Jul 25 21:14:33 1997
+++ ChangeLog	Fri Jul 25 21:14:10 1997
@@ -1,3 +1,8 @@
+1997-07-25  David Moore  <dmoore@ucsd.edu>
+
+	* alloc.c (Fmake_byte_code): GC protect newly allocated function
+	when looking up filename.
+
 1997-07-10  Hrvoje Niksic  <hniksic@srce.hr>
 
 	* fileio.c (Finsert_file_contents_internal): Handle non-regular
--- alloc.c.orig	Fri Jul 25 21:14:26 1997
+++ alloc.c	Fri Jul 25 21:14:10 1997
@@ -1599,9 +1599,12 @@
       b->annotated = Vload_file_name_internal_the_purecopy;
     else if (!NILP (Vload_file_name_internal))
       {
+	struct gcpro gcpro1;
+	GCPRO1(val);		/* don't let val or b get reaped */
 	Vload_file_name_internal_the_purecopy =
 	  Fpurecopy (Ffile_name_nondirectory (Vload_file_name_internal));
 	b->annotated = Vload_file_name_internal_the_purecopy;
+	UNGCPRO;
       }
 #endif

--Multipart_Fri_Jul_25_21:17:27_1997-1--

