hash_put (struct Lisp_Hash_Table *h, Lisp_Object key, Lisp_Object value,
hash_hash_t hash)
{
+ eassert (!BASE_EQ (key, Qunbound));
/* Increment count after resizing because resizing may fail. */
maybe_resize_hash_table (h);
h->count++;
included in the dump despite all references to them being
bitwise-invariant. */
return (!dump_object_self_representing_p (object)
- || dump_object_emacs_ptr (object));
+ || (dump_object_emacs_ptr (object)
+ /* Don't dump Qunbound -- it's not a legal hash table key. */
+ && !BASE_EQ (object, Qunbound)));
}
static void
return offset;
}
+/* Give Qunbound its name.
+ All other symbols are dumped and loaded but not Qunbound because it
+ cannot be used as a key in a hash table.
+ FIXME: A better solution would be to use a value other than Qunbound
+ as a marker for unused entries in hash tables. */
+static void
+pdumper_init_symbol_unbound (void)
+{
+ eassert (NILP (SYMBOL_NAME (Qunbound)));
+ const char *name = "unbound";
+ init_symbol (Qunbound, make_pure_c_string (name, strlen (name)));
+}
+
static dump_off
dump_vectorlike_generic (struct dump_context *ctx,
const union vectorlike_header *header)
for (int i = 0; i < nr_dump_hooks; ++i)
dump_hooks[i] ();
+ pdumper_init_symbol_unbound ();
+
#ifdef HAVE_NATIVE_COMP
pdumper_set_emacs_execdir (argv0);
#else