From: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: 75292@debbugs.gnu.org
Subject: bug#75292: 31.0.50; igc: (file-error "Doing vfork" "Bad address")
Date: Fri, 03 Jan 2025 19:11:58 +0000 [thread overview]
Message-ID: <8734hzk91d.fsf@protonmail.com> (raw)
In-Reply-To: <87y0zrg4om.fsf@localhost>
Pip Cet <pipcet@protonmail.com> writes:
> "Ihor Radchenko" <yantar92@posteo.net> writes:
>
> The most likely candidate right now is make_environment_block, which
> happily stuffs string data pointers into an xmalloc'd block and goes
> about its merry way without letting GC know about them. I think it
> would cause the problem you observed, but haven't managed to reproduce
> it yet. If I manage to do so, I'll push a fix.
There's definitely a bug there (inserting an igc_collect() will corrupt
the environment), and I'll fix it, but I'm a bit puzzled by the "Bad
address" thing, and I think there may be an additional bug (making four
overall for this very productive bug report):
How do syscalls and execve(), in particular, handle the case of a
pointer to MPS-managed memory which is behind an active memory barrier?
I'm pretty sure there's no SIGSEGV in this case, just an EFAULT. Easily
fixable for execve, which accesses only a limited amount of data, but I
don't remember whether we ever read() or write() MPS-managed memory,
which I assume would eventually run into this bug.
If syscalls silently accept mprotect()ed mapped areas which are
currently inaccessible (they really shouldn't because it breaks w+x
protection!), that's an additional problem we need to work around,
because the memory contents might not be valid. I don't think we(*)
ever read() or write() Lisp_Objects and expect useful results, so maybe
everything's okay in that case?
(*) - the fork()-based mark-and-sweep GC did, so it's not entirely
unreasonable to do that :-)
Pip
prev parent reply other threads:[~2025-01-03 19:11 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-02 17:54 bug#75292: 31.0.50; igc: (file-error "Doing vfork" "Bad address") Ihor Radchenko
2025-01-02 18:37 ` Eli Zaretskii
2025-01-02 18:42 ` Ihor Radchenko
2025-01-02 19:29 ` Eli Zaretskii
2025-01-02 19:37 ` Ihor Radchenko
2025-01-02 20:22 ` Eli Zaretskii
2025-01-02 20:45 ` Ihor Radchenko
2025-01-02 21:07 ` Eli Zaretskii
2025-01-03 17:56 ` Ihor Radchenko
2025-01-03 19:33 ` Eli Zaretskii
2025-01-04 14:12 ` Ihor Radchenko
2025-01-04 14:20 ` Eli Zaretskii
2025-01-07 17:40 ` Ihor Radchenko
2025-01-07 17:50 ` Eli Zaretskii
2025-01-07 18:44 ` Ihor Radchenko
2025-01-07 19:28 ` Eli Zaretskii
2025-01-03 20:21 ` Eli Zaretskii
2025-01-04 14:13 ` Ihor Radchenko
2025-01-04 14:22 ` Eli Zaretskii
2025-01-04 15:21 ` Ihor Radchenko
2025-01-02 19:41 ` Paul Eggert
2025-01-02 20:35 ` Eli Zaretskii
2025-01-02 20:45 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-03 17:58 ` Ihor Radchenko
2025-01-03 18:24 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-03 19:47 ` Eli Zaretskii
2025-01-03 19:51 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-03 19:11 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734hzk91d.fsf@protonmail.com \
--to=bug-gnu-emacs@gnu.org \
--cc=75292@debbugs.gnu.org \
--cc=pipcet@protonmail.com \
--cc=yantar92@posteo.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.