changeset 10245:f0637b2f1671

(wrong_type_argument): Abort if VALUE is invalid Lisp object.
author Richard M. Stallman <rms@gnu.org>
date Sun, 25 Dec 1994 17:28:51 +0000
parents 3d95ea97eb9e
children c000ce65503e
files src/data.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/data.c	Sun Dec 25 14:35:19 1994 +0000
+++ b/src/data.c	Sun Dec 25 17:28:51 1994 +0000
@@ -101,6 +101,12 @@
 	 if (INTEGERP (value) && EQ (predicate, Qstringp))
 	   return Fnumber_to_string (value);
 	}
+
+      /* If VALUE is not even a valid Lisp object, abort here
+	 where we can get a backtrace showing where it came from.  */
+      if ((unsigned int) XGCTYPE (value) > Lisp_Window + 2)
+	abort ();
+
       value = Fsignal (Qwrong_type_argument, Fcons (predicate, Fcons (value, Qnil)));
       tem = call1 (predicate, value);
     }