]> git.eshelyaron.com Git - emacs.git/commitdiff
(wrong_type_argument): Abort if VALUE is invalid Lisp object.
authorRichard M. Stallman <rms@gnu.org>
Sun, 25 Dec 1994 17:28:51 +0000 (17:28 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 25 Dec 1994 17:28:51 +0000 (17:28 +0000)
src/data.c

index 2f41d4ee60ffe8fc244730378c7da405ecf9e2cf..24ee967d30338f06a5bdfb3b5f5dfcc36ba7f267 100644 (file)
@@ -101,6 +101,12 @@ wrong_type_argument (predicate, value)
         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);
     }