Subject: Re: bug#13573: 24.3.50; src/profiler.c:123: Emacs fatal error: assertion failed: EQ (log->next_free, make_number (i))

From: Stefan Monnier <[email-masked]>
Date: Wed, 30 Jan 2013 12:52:54 -0500

> Crash caused by profiler when byte-force-recompile all Lisp sources.
> Found in bzr revision 111614 and looks regular.

111614 of emacs-24 or of trunk?
By "looks regular" do you mean that you can reproduce it reliably?

> Steps to reproduce:
> ./src/emacs -Q
> M-x profiler-start RET cpu RET
> M-x byte-force-recompile RET lisp RET
> --enable-checking is enabled, the crash is:

Hmm... that terminates without error for me.

> src/profiler.c:123: Emacs fatal error: assertion failed: EQ (log->next_free, make_number (i))

Could you look at log->next_free to see if it's a number or if it's nil?

If it's nil it means that Fremq somehow did not find `key', even though
we took it straight from the has-table itself.
If it's a number different from i, it means that Fremq somehow found
(and removed) another occurrence of `key' in the has-table.

Unless of course there's something trickier going on, such as some
signal triggering right between Fremq and the eassert (and that signal
somehow modifies the hash-table).

        Stefan