From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jca+emacs@wxcvbn.org (=?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges-Ang?= =?utf-8?Q?las?=) Newsgroups: gmane.emacs.devel Subject: Question about dumping and initialization Date: Thu, 14 Mar 2013 12:13:27 +0100 Message-ID: <87r4ji44ko.fsf@moo.wxcvbn.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1363259720 10900 80.91.229.3 (14 Mar 2013 11:15:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Mar 2013 11:15:20 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 14 12:15:45 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UG68N-0005PP-Bm for ged-emacs-devel@m.gmane.org; Thu, 14 Mar 2013 12:15:43 +0100 Original-Received: from localhost ([::1]:58416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG680-00051N-LA for ged-emacs-devel@m.gmane.org; Thu, 14 Mar 2013 07:15:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG67r-00050o-K8 for emacs-devel@gnu.org; Thu, 14 Mar 2013 07:15:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UG67q-0004gp-CE for emacs-devel@gnu.org; Thu, 14 Mar 2013 07:15:11 -0400 Original-Received: from [2001:910:112c::a0a:4] (port=55367 helo=coloc.wxcvbn.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG67q-0004dW-3z for emacs-devel@gnu.org; Thu, 14 Mar 2013 07:15:10 -0400 Original-Received: by coloc.wxcvbn.org (Postfix, from userid 10) id 5523B810C8; Thu, 14 Mar 2013 12:15:08 +0100 (CET) Original-Received: from moo.wxcvbn.org (localhost [127.0.0.1]) by moo.wxcvbn.org (8.14.6/8.14.6) with ESMTP id r2EBDWIb016715 for ; Thu, 14 Mar 2013 12:13:32 +0100 (CET) Original-Received: (from jca@localhost) by moo.wxcvbn.org (8.14.6/8.14.5/Submit) id r2EBDW0x016951; Thu, 14 Mar 2013 12:13:32 +0100 (CET) Mail-Followup-To: emacs-devel@gnu.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:910:112c::a0a:4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157843 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=3Dyes 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: =2D aren't reset by temacs at dump time or =2D 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=3Dyes 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, =2D-=20 J=C3=A9r=C3=A9mie Courr=C3=A8ges-Anglas - Emacs OpenBSD port maintainer GPG Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (OpenBSD) iQIcBAEBCgAGBQJRQbDXAAoJEGGRj78GoRSUVkoQAJTSXm3/5sYo6cMnxz7ZqWRS Lon+Sax4uqWvATM0tSeGwYLmt3fuobYUx3mqHxMFUdhdB7Zs34Fs6UehVO8k+K3q y4+nCiHt23abXjB40cG1VR4mjaQQs98yD0Lb9TwPr00GCk4QVDCg5A/24+ger9UO PWtEt8/sI2rVQexMZU1r8aMfeLGknDl34G5CgmTSyX7tRopLBxhdCj3klLL39HSl 2gwyQjE1288aeeWp4Qrso47EOOeqAboWQ1LjekOS34/2v0qyOBtA0+oW3si+sLW1 DBw2HCVCDuY+LP4QuIgrD8+LLqvJa6CxGv2Iq/5xHQiZw0SEnuG+s7mWmLFcZAVK ykLpGg0/X9V6cbYs7K/eajF+qC13X97uy+BF7Fin6jTjjVrfYXYn4a+wDD3K2tF0 Nf1qh9Ioz+4fIalyeQEcrNClIaZAb+OKzuRx1RDIJ8CpBQTo7inLBXG1mIBINpPc QSAhm0Xwwhtpjx0MIKxAa09LpQ0fhK5NZMTgv6x8mYOQVrO4RBuDTp0Tag3oEVyc fcQnjsr5wbEOMrGRxZEyCmY9gthmHnR1/oeDzLrRFYZ/D3IvsRCqBI/Z2WyKWwQw WRtgYTSQdZ6w6cdTmaBIgn/P8FBGitCjTaX294NisKpQ8cw8BJhFgSuL/sVbNeM+ rtIzeIbhiw9/oTdBfneZ =9OCg -----END PGP SIGNATURE----- --=-=-=--