From: Andrea Corallo Date: Mon, 3 Feb 2020 21:12:03 +0000 (+0000) Subject: Add assertion in load_comp_unit X-Git-Tag: emacs-28.0.90~2727^2~838 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ea56b58098d78b242bc0c51cf1d8b1d21962c130;p=emacs.git Add assertion in load_comp_unit While resurrecting from an image dump loading more than once the same compilation unit does not make any sense. --- diff --git a/src/comp.c b/src/comp.c index ebe7b8b9a9a..03b320bf5f4 100644 --- a/src/comp.c +++ b/src/comp.c @@ -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