From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#34180: 27.0.50; argv[0] used incorrectly to find the .pdmp Date: Tue, 12 Oct 2021 09:24:48 -0700 Message-ID: <3b65b08e-4f6d-d2cb-6621-7f6e988227de@dancol.org> References: <59495BCF-EF2F-4E1F-A466-1CC61CE57893@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16229"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: 34180@debbugs.gnu.org, Lars Ingebrigtsen , Paul Eggert , Stefan Monnier To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 12 18:43:38 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maKsL-0003z7-0a for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 18:43:37 +0200 Original-Received: from localhost ([::1]:43994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKsF-0000y3-RU for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 12:43:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKaM-0003ha-TV for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 12:25:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39203) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKaM-0006zZ-Ko for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 12:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1maKaM-0003n6-Hu for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 12:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Oct 2021 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34180 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: security Original-Received: via spool by 34180-submit@debbugs.gnu.org id=B34180.163405589614539 (code B ref 34180); Tue, 12 Oct 2021 16:25:02 +0000 Original-Received: (at 34180) by debbugs.gnu.org; 12 Oct 2021 16:24:56 +0000 Original-Received: from localhost ([127.0.0.1]:50740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maKaF-0003mL-Sb for submit@debbugs.gnu.org; Tue, 12 Oct 2021 12:24:56 -0400 Original-Received: from dancol.org ([96.126.100.184]:42270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maKaB-0003m3-RX for 34180@debbugs.gnu.org; Tue, 12 Oct 2021 12:24:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=65tIFKBI3G+QeRjR6AhZqtVbVKmY3lO6xRcaErnx77k=; b=fiKESDl9CvS1uwsnlonvMt/KDc O5vjZCMnCgHw+EAths4b3g1Mcgoh6JSHKKvIrrUXVkC7lmHaP+DPLSZUJrso7Nt8FmHW9e42opz1B K6yfb25uWebLMNPp5bomQbXS5IRMKidiYlmb+95HXdLe1kMefah2ayNanAIjTOU+bKswmfl03rpFs 8yGM0qq2zJXbZ4/bwtGHfRVHYITCX9lLhDMIegxKN5uVG+fki4uhJKvUjYO3phZABXl3J9L6gINlx m9gu0jFPS6QWn8k+ZfBrpgzAtHLH6c6wFRCZlz7ne+dTzmN60jG9WUO/O7D7pukJgfnCp5/f29Z9s ZwSmLvFQ==; Original-Received: from [2604:4080:1321:8020:2761:c5fe:e373:3ed] (port=37626) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1maKa9-0005AH-Cj; Tue, 12 Oct 2021 09:24:49 -0700 In-Reply-To: <59495BCF-EF2F-4E1F-A466-1CC61CE57893@acm.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217055 Archived-At: On 10/12/21 5:27 AM, Mattias EngdegÄrd wrote: > I don't think Paul meant that we necessarily have to use the embedded dump in-place. It could just as well be the source of a memory copy to its runtime location; everything would then work just like today except that the dump file is embedded into the executable. Copying the dump on startup will hurt performance --- the dump is meant to be used directly from a disk-backed file. I'm also not entirely clear on how you're planning on avoiding the usual problems with executable modification --- relinking the executable can change all the locations of the symbols in the binary, and if symbol locations change, any previously-generated dump becomes invalid. Even if on *some* platforms *today* we can replace an embedded dump image in an already-built executable without re-linking the thing, there's no guarantee that we can continue doing that. (For example --- imagine a future platform that signs all binaries during the build process.) Modifying binaries is always a platform-specific thing and doing it for Emacs risks forward compatibility. Usin a separate dump file relies only on public APIs guaranteed to work forever.