From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#23529: Request for fixing randomize_va_space build issues Date: Tue, 6 Sep 2016 13:37:20 -0700 Organization: UCLA Computer Science Department Message-ID: References: <573C2601.3030308@cs.ucla.edu> <54b89449-083a-a906-986a-f284dbbf482a@cs.ucla.edu> <02c57124-ef39-bc30-89ba-998986d070fc@cs.ucla.edu> <834m5tapuu.fsf@gnu.org> <83twdsalbk.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1473197674 17541 195.159.176.226 (6 Sep 2016 21:34:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Sep 2016 21:34:34 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 Cc: p.stephani2@gmail.com, philippe.vaucher@gmail.com, 23529@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 06 23:34:30 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhO0d-00039Z-IN for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Sep 2016 23:34:24 +0200 Original-Received: from localhost ([::1]:36064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhO0Z-000741-Su for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Sep 2016 17:34:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhNzP-0006IR-I6 for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 17:33:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhNzO-0006c7-Kk for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 17:33:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhNzO-0006c3-HX for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 17:33:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bhN94-0002rJ-EP for bug-gnu-emacs@gnu.org; Tue, 06 Sep 2016 16:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Sep 2016 20:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23529 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23529-submit@debbugs.gnu.org id=B23529.147319433710975 (code B ref 23529); Tue, 06 Sep 2016 20:39:02 +0000 Original-Received: (at 23529) by debbugs.gnu.org; 6 Sep 2016 20:38:57 +0000 Original-Received: from localhost ([127.0.0.1]:51750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhN8j-0002qi-Q4 for submit@debbugs.gnu.org; Tue, 06 Sep 2016 16:38:56 -0400 Original-Received: from [131.179.128.68] (port=36934 helo=zimbra.cs.ucla.edu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhN8S-0002ot-VX for 23529@debbugs.gnu.org; Tue, 06 Sep 2016 16:38:40 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6F71E160195; Tue, 6 Sep 2016 13:37:22 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id eElLLRBj-7RZ; Tue, 6 Sep 2016 13:37:21 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A3950160DFF; Tue, 6 Sep 2016 13:37:21 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JrF7xIAHZ4Fq; Tue, 6 Sep 2016 13:37:21 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 87B6C160195; Tue, 6 Sep 2016 13:37:21 -0700 (PDT) In-Reply-To: <83twdsalbk.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123044 Archived-At: On 09/06/2016 12:18 PM, Eli Zaretskii wrote: > Then users on those platforms will never be able to re-dump. True. But they'll still be better off than they are now, since they can't dump at all now. Plus, for extra credit we could dynamically link the dumped object modules at Emacs startup, with the idea of making it practical to re-dump. > I actually don't understand why the data should be serialized as C > code. Why not just data that is read into memory (with conversion to > the native format)? A compiler is not the only way to convert text > into binary data. The compiler-based approach should be simpler and more portable than messing with low-level binary I/O. For example, it should be easy to arrange for some of the objects to be read-only: just declare them to be 'const'. Another example: on hardened platforms with PIEs (position-independent executables), you get a PIE for free as the dumped executable, instead of having to disable PIE as we do now. Although Emacs can do this sort of work itself (e.g., randomizing locations of dumped objects, munging pointers as they come in to match the random locations, and using mmap to make the relevant objects const), it should be better for Emacs to use the linking technology already available on modern platforms, rather than trying to reinvent the wheel.