]> git.eshelyaron.com Git - emacs.git/commitdiff
Add assertion in load_comp_unit
authorAndrea Corallo <akrl@sdf.org>
Mon, 3 Feb 2020 21:12:03 +0000 (21:12 +0000)
committerAndrea Corallo <akrl@sdf.org>
Tue, 4 Feb 2020 11:03:13 +0000 (11:03 +0000)
While resurrecting from an image dump loading more than once the
same compilation unit does not make any sense.

src/comp.c

index ebe7b8b9a9aeeee9cded86f1b47eb8444c9e77c2..03b320bf5f4fe2bb644f32fb0fff481cf07a4d4d 100644 (file)
@@ -3300,6 +3300,10 @@ load_comp_unit (struct Lisp_Native_Comp_Unit *comp_u, bool loading_dump)
     xsignal1 (Qnative_lisp_file_inconsistent, comp_u->file);
   bool reloading_cu = *saved_cu ? true : false;
 
+  /* While resurrecting from an image dump loading more than once the
+     same compilation unit does not make any sense.  */
+  eassert (!(loading_dump && reloading_cu));
+
   if (reloading_cu)
     /* 'dlopen' returns the same handle when trying to load two times
        the same shared.  In this case touching 'd_reloc' etc leads to