This happened when subr.eln was not the first native compilation unit
to be loaded. register_native_comp_unit() is called when loading a
native compilation unit and that in turn used to call `gensym', which
was not loaded yet. This led to a SIGSEGV.
* src/comp.c (register_native_comp_unit): Replace the call to `gensym'
with an ad-hoc counter.
register_native_comp_unit (Lisp_Object comp_u)
{
#ifdef WINDOWSNT
- Fputhash (CALL1I (gensym, Qnil), comp_u, all_loaded_comp_units_h);
+ /* We have to do this since we can't use `gensym'. This function is
+ called early when loading a dump file and subr.el may not have
+ been loaded yet. */
+ static intmax_t count;
+
+ Fputhash (make_int (count++), comp_u, all_loaded_comp_units_h);
#endif
}