unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: 34655@debbugs.gnu.org, p.stephani2@gmail.com
Subject: bug#34655: 26.1.92; Segfault in module with --module-assertions
Date: Sun, 17 Mar 2019 19:08:01 +0200	[thread overview]
Message-ID: <83lg1dwhse.fsf@gnu.org> (raw)
In-Reply-To: <87h8c1cv6l.fsf@tcd.ie> (contovob@tcd.ie)

> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Cc: <34655@debbugs.gnu.org>, Philipp Stephani <p.stephani2@gmail.com>
> Date: Sun, 17 Mar 2019 16:38:58 +0000
> 
> These reveal that value_to_lisp eventually returns a corrupted string,
> but I don't know why.

Did you try to identify the code which causes the corruption, i.e. the
data is valid before that code runs, and invalid after that?  If not,
can you try?  The way to do that is by painstakingly stepping through
the code while examining the relevant data, possibly with help of
watchpoints and displays set up by the GDB "display" command.

> I've seen comments in src/fileio.c referring to string-relocation
> during GC; could this be at play here?

It could be, if your module code holds onto C pointers to Lisp string
data while Emacs runs parts of the interpreter which could GC.  Does
that happen anywhere in your code or in the code involved in
module-assertions?

> Either way, do you have any suggestions on how to proceed?

See above.

I tried at the time to reproduce your problem, and failed.  But I did
that on Windows, where I needed to replace the non-existent realpath
by an equivalent function, so it's not a faithful reproduction.  I
will see if I can find time to look at this on a GNU machine, unless
someone beats me to it.

> 8. bt full
> 9. f 2
> 10. p p
> 11. pr [#<INVALID_LISP_OBJECT 0x03059c90>]
> 12. xpr

Why did you expect 'p' to be a valid Lisp object?  It's actually a
pointer to a Lisp object, i.e. try

  (gdb) p *p
  (gdb) xpr





  reply	other threads:[~2019-03-17 17:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 21:00 bug#34655: 26.1.92; Segfault in module with --module-assertions Basil L. Contovounesios
2019-02-26  2:59 ` Richard Stallman
2019-02-26 11:16   ` Basil L. Contovounesios
2019-02-26 15:27     ` Eli Zaretskii
2019-02-26 18:42       ` Basil L. Contovounesios
2019-02-27  4:10     ` Richard Stallman
2019-02-26 15:45 ` Eli Zaretskii
2019-03-17 16:38   ` Basil L. Contovounesios
2019-03-17 17:08     ` Eli Zaretskii [this message]
2019-03-17 23:52       ` Basil L. Contovounesios
2019-03-18 16:21         ` Eli Zaretskii
2019-03-18 16:58           ` Basil L. Contovounesios
2019-03-18 17:53             ` Eli Zaretskii
2019-03-21 16:11               ` Philipp Stephani
2019-03-21 17:00                 ` Eli Zaretskii
2019-03-21 18:28                   ` Philipp Stephani
2019-03-21 19:23                     ` Philipp Stephani
2019-03-21 19:34                       ` Eli Zaretskii
2019-03-21 21:29                       ` Basil L. Contovounesios
2019-03-22  7:11                         ` Eli Zaretskii
2019-03-21 19:27                     ` Eli Zaretskii
2019-03-21 19:37                       ` Philipp Stephani
2019-03-21 19:50                         ` Eli Zaretskii
2019-03-21 20:01                           ` Philipp Stephani
2019-03-21 20:14                             ` Eli Zaretskii
2019-03-21 20:26                               ` Philipp Stephani
2019-03-21 20:44                                 ` Eli Zaretskii
2019-03-21 20:48                                 ` Daniel Colascione
2019-03-22  8:17                                   ` Eli Zaretskii
2019-03-21 21:31                         ` Basil L. Contovounesios
2019-03-22  0:56                       ` Stefan Monnier
2019-03-22  8:16                         ` Eli Zaretskii

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=83lg1dwhse.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34655@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    --cc=p.stephani2@gmail.com \
    /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).