Subject: bug#61507: 29.0.60; "free(): invalid pointer" on latest emacs-29 commit when loading init.el

From: Po Lu <[email-masked]>
Date: Tue, 14 Feb 2023 22:29:48 +0800

Simon Pugnet <[email-masked]> writes:

> Dear Emacs maintainers,
>
> I've just built Emacs from commit
> 4bb27a5ca93f8269d9cd4b85fd948176304236eb on the emacs-29 branch and it
> fails to launch with the following message when loading my init.el
> file: -
>
> free(): invalid pointer
> Fatal error 6: Aborted
>
> Launching with -q or -Q works fine. Checking out a previous commit
> (cc30422825a5acf460d026bfe912b327b70dedcf) and rebuilding causes
> everything to work as expected again too.
>
> I've tried `make extraclean` and then `make bootstrap` in order to
> clear out any old byte-compiled or native-compiled elisp as I read
> another message earlier saying that a recent change might have caused
> a backwards incompatible change.
>
> Output of `bt full` in GDB: -

Will you please run Emacs on top of some kind of memory error checker
and see if that shows the problem's cause?

I.E. with valgrind's memcheck:

  valgrind /path/to/emacs

it should complain about a double free.