From 3bc77cca86fbed8c12fb6c10c51e1237d65c9143 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Mon, 11 Nov 2019 13:19:23 +0100 Subject: [PATCH] minimal error handling in load_comp_unit --- src/comp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/comp.c b/src/comp.c index 0e190e88874..f72d25a6ba9 100644 --- a/src/comp.c +++ b/src/comp.c @@ -3210,7 +3210,9 @@ load_comp_unit (dynlib_handle_ptr handle) Lisp_Object subr = Fsymbol_function (f_sym); if (!NILP (subr)) { - eassert (SUBRP (subr)); + /* FIXME: This is really not robust in case of subr redefinition. */ + if (!SUBRP (subr)) + error ("Native code load error, subr redefined or wrong relocation."); f_relocs[i] = XSUBR (subr)->function.a0; } else if (!strcmp (f_str, "wrong_type_argument")) { -- 2.39.5