unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help please! To track down GC trying to free an already freed object.
@ 2019-04-02 11:25 Alan Mackenzie
  2019-04-02 15:04 ` Eli Zaretskii
  2019-04-02 19:09 ` Daniel Colascione
  0 siblings, 2 replies; 24+ messages in thread
From: Alan Mackenzie @ 2019-04-02 11:25 UTC (permalink / raw)
  To: emacs-devel

Hello, Emacs.

I get this problem after a recent merge of master into
/scratch/accurate-warning-pos (my branch where I'm trying to implement
correct source positions in the byte compiler's warning messages).  This
was a large merge, including bringing in the portable dumper.

Emacs aborts at mark_object L+179 (in alloc.c), because a pseudovector
being freed already has type PVEC_FREE, i.e. has been freed already.
This object is a "symbol with position", a type of pseudovector which
doesn't yet exist outside of this scratch branch.

At a guess, I'm setting some data structure in the C code to a Lisp
structure containing this object, but failing to apply static protection
to this C variable.  Or something like that.

This failure occurs during the byte compilation of .../lisp/registry.el
in a make or make bootstrap.  The failure only occurs when this byte
compilation is started as -batch from the command line.  So my use of
GDB is from the command line, not within a running Emacs.

With GDB, I can break at the creation of this symbol-with-position
object and again at its (first) freeing with this breakpoint:

    break setup_on_free_list if (v == 0x5555561d0450)

.  However, this isn't helping me to track down the Lisp object which
still references this symbol-with-position.  I've tried to find the
address of Emacs's data segment, so as to be able to search through it
for 0x5555561d0455 in GDB, but this doesn't feel like a very useful
thing to do.

Could somebody who has experience in this sort of thing please suggest
how I might proceed with the debugging, or possibly offer me some other
sort of help or hints.

Thanks in advance!

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2019-04-06 12:23 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-02 11:25 Help please! To track down GC trying to free an already freed object Alan Mackenzie
2019-04-02 15:04 ` Eli Zaretskii
2019-04-02 20:42   ` Alan Mackenzie
2019-04-03  4:43     ` Eli Zaretskii
2019-04-04 18:57       ` Alan Mackenzie
2019-04-02 19:09 ` Daniel Colascione
2019-04-02 19:21   ` Eli Zaretskii
2019-04-02 20:46     ` Alan Mackenzie
2019-04-02 21:03       ` Daniel Colascione
2019-04-03  4:39       ` Eli Zaretskii
2019-04-03 10:01         ` Alan Mackenzie
2019-04-03 10:12           ` Eli Zaretskii
2019-04-03 15:23           ` Paul Eggert
2019-04-02 20:24   ` Alan Mackenzie
2019-04-02 20:33     ` Daniel Colascione
2019-04-02 21:00       ` Alan Mackenzie
2019-04-05  4:49         ` Alex
2019-04-05  8:26           ` Alan Mackenzie
2019-04-05 17:05             ` Comparing symbol-with-position using eq (was: Help please! To track down GC trying to free an already freed object.) Alex
2019-04-05 18:21               ` Comparing symbol-with-position using eq Alan Mackenzie
2019-04-05 20:18                 ` Daniel Colascione
2019-04-05 21:54                   ` Alan Mackenzie
2019-04-05 22:50                     ` Paul Eggert
2019-04-06 12:23                     ` Clément Pit-Claudel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).