From: jca+emacs@wxcvbn.org (Jérémie Courrèges-Anglas)
To: emacs-devel@gnu.org
Subject: Question about dumping and initialization
Date: Thu, 14 Mar 2013 12:13:27 +0100 [thread overview]
Message-ID: <87r4ji44ko.fsf@moo.wxcvbn.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]
Hi folks,
I'm currently trying to make Emacs use my system's malloc to build 24.3
(my system is OpenBSD). In order to achieve this, I force
system_malloc=yes in the configure script; the build fails right at
./temacs startup time.
Suspecting a problem with malloc randomization (which is on for all
executables on OpenBSD), I #define USE_LSB_TAG 1, hoping to avoid
pointer mangling. This works rather well and leads to temacs dumping
successfully.
Sadly the produced bootstrap-emacs isn't usable and fails with segfaults
in alloc.c. I'm 99% sure that those segfaults are due to file-global
variables that either:
- aren't reset by temacs at dump time or
- aren't properly re-initialized the dumped bootstrap-emacs executable
(I've used a hack to make emacs reset some of those variables at
startup; each time I re-initialized a new variable, the dumped
executable could run a bit longer. The first variable that needed this
treatment was src/alloc.c:float_free_list).
I don't know much about Emacs internals but I'd rather go with the
second reason. I've tested a bit temacs (CANNOT_DUMP=yes in
src/Makefile) and even though it is of course very slow at startup
time, it seems rather stable so far. Thus I think I'm on the right
road.
So, has any of you already met this problem, and if so, could you please
give me hints about where I should look next?
Thank you for your attention,
--
Jérémie Courrèges-Anglas - Emacs OpenBSD port maintainer
GPG Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494
[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2013-03-14 11:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 11:13 Jérémie Courrèges-Anglas [this message]
2013-03-14 21:16 ` Question about dumping and initialization Paul Eggert
2013-03-14 22:36 ` Jérémie Courrèges-Anglas
2013-03-15 1:35 ` Paul Eggert
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=87r4ji44ko.fsf@moo.wxcvbn.org \
--to=jca+emacs@wxcvbn.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).