unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dancol@dancol.org, emacs-devel@gnu.org
Subject: Re: Help please! To track down GC trying to free an already freed object.
Date: Wed, 3 Apr 2019 10:01:13 +0000	[thread overview]
Message-ID: <20190403100113.GA11372@ACM> (raw)
In-Reply-To: <831s2jg0s8.fsf@gnu.org>

Hello, Eli.

On Wed, Apr 03, 2019 at 07:39:35 +0300, Eli Zaretskii wrote:
> > Date: Tue, 2 Apr 2019 20:46:53 +0000
> > From: Alan Mackenzie <acm@muc.de>
> > Cc: Daniel Colascione <dancol@dancol.org>, emacs-devel@gnu.org

> > > GDB supports reverse execution as well, on some platforms.

> > On my GNU/Linux system, I tried to run 'reverse-next', and got the error
> > message:

> >     Target multi-thread does not support this command.

> I think you are supposed to record the execution, and then say

>   (gdb) target record-core

> or

>   (gdb) target record-btrace

> before the reverse execution is available.

Yes.  I thought there was something missing.  ;-)  There's no mention of
such recording in the GDB manual's "Reverse Execution" page, nor any
cross reference to "Process Record and Replay" there.

I'll try again and see if I can get it working.

> But I was always able to debug GC problems by using last_marked array.

The problem I think I'm up against is that the symbol-with-pos object is
not being marked at a particular garbage_collect_1, and thus gets freed
prematurely.

I intend to get the hex values of the Lisp_Objects which constitute the
list in which the symbol-with-pos is embedded and search for these in
last_marked.  Putting a conditional breakpoint on Fcons slows down Emacs
somewhat.  ;-)

-- 
Alan Mackenzie (Nuremberg, Germany).



  reply	other threads:[~2019-04-03 10:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190403100113.GA11372@ACM \
    --to=acm@muc.de \
    --cc=dancol@dancol.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).