]> git.eshelyaron.com Git - emacs.git/commitdiff
minimal error handling in load_comp_unit
authorAndrea Corallo <akrl@sdf.org>
Mon, 11 Nov 2019 12:19:23 +0000 (13:19 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:03 +0000 (11:38 +0100)
src/comp.c

index 0e190e88874eec7ea6488a22df03098abd5b4070..f72d25a6ba9d60a492b9145e4fcce7bd87ef1295 100644 (file)
@@ -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"))
        {