[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp ea56b58 2/2: Add assertion in load_comp_unit
From: |
Andrea Corallo |
Subject: |
feature/native-comp ea56b58 2/2: Add assertion in load_comp_unit |
Date: |
Tue, 4 Feb 2020 06:08:51 -0500 (EST) |
branch: feature/native-comp
commit ea56b58098d78b242bc0c51cf1d8b1d21962c130
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>
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.
---
src/comp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/comp.c b/src/comp.c
index ebe7b8b..03b320b 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