From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#34180: 27.0.50; argv[0] used incorrectly to find the .pdmp Date: Mon, 11 Oct 2021 20:51:31 -0400 Message-ID: References: <5d5d6da7-d0d4-82ae-8034-78d47a6b12c8@dancol.org> <83va2a3z0d.fsf@gnu.org> <87wnmjhd6j.fsf@gnus.org> <97e17ac7-b46f-5cac-e0da-8a8f1e26813b@dancol.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30572"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 34180@debbugs.gnu.org, Lars Ingebrigtsen , Paul Eggert , Eli Zaretskii To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 12 02:52:10 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 1ma61a-0007iu-Gi for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 02:52:10 +0200 Original-Received: from localhost ([::1]:50764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ma61Y-0004UT-Iv for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Oct 2021 20:52:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ma61S-0004UJ-LJ for bug-gnu-emacs@gnu.org; Mon, 11 Oct 2021 20:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ma61S-0007tQ-Cu for bug-gnu-emacs@gnu.org; Mon, 11 Oct 2021 20:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ma61S-0008LY-6e for bug-gnu-emacs@gnu.org; Mon, 11 Oct 2021 20:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Oct 2021 00:52: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.163399990132053 (code B ref 34180); Tue, 12 Oct 2021 00:52:02 +0000 Original-Received: (at 34180) by debbugs.gnu.org; 12 Oct 2021 00:51:41 +0000 Original-Received: from localhost ([127.0.0.1]:33049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ma617-0008Ku-69 for submit@debbugs.gnu.org; Mon, 11 Oct 2021 20:51:41 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ma616-0008Kj-F6 for 34180@debbugs.gnu.org; Mon, 11 Oct 2021 20:51:40 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 87EDB80582; Mon, 11 Oct 2021 20:51:34 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 10C398042B; Mon, 11 Oct 2021 20:51:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1633999893; bh=9wgs8buWmjlHjAMuEBZCJIAVwIdvyyPGjnyJXI8JEGc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=LMU/UIBaLacIVJLFPvZOCtpQgP7WZtRv4HzfV7AubmdGo93lXz+a7ipKJ4xl8d175 AXxoYZEwrQtnmaOOls1oRP3zOiT4rEwzvvxaMJ/6Ql9eQDgkvB+/TAr4XsIRBst5QU 0RN+xzaX2LVH1E13eZyRAmJ5Ra/e6QBapkCv4BH7/nrdEn6G74UsZm9cjhmbMhtc4A gAUcqPzuTCoReFRjaGvjuTigGWbpMQB231ROUVTCMC+JLPJAA0P20GYxIS/09x750+ WogaF7mmfsWPCxqf1KE1oRfUJvYIAkw8FwRVWghiI1iBoVNfLQl5wJR+hCp3YG8uhW PwEei0ZHXz7hQ== Original-Received: from pastel (unknown [45.72.241.23]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C671512020A; Mon, 11 Oct 2021 20:51:32 -0400 (EDT) In-Reply-To: <97e17ac7-b46f-5cac-e0da-8a8f1e26813b@dancol.org> (Daniel Colascione's message of "Mon, 11 Oct 2021 13:13:18 -0700") 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:216978 Archived-At: > It's not quite that simple though. The pdmp file includes offsets of data > structures within the Emacs executable. Rebuilding the executable with a big > char array will change these offsets and invalidate the pdmp blob you're > trying to embed. Now, you could try to guess the size of the blob ahead of > time, include a dummy embedded array of that size in Emacs, dump, and then > overwrite the embedded array post-build, but there's no guarantee that doing > that would actually work on all systems. Maybe we could avoid this problem by moving most of the Emacs executable to a shared library, so the Emacs executable would be just a `dump` variable and ` main` function which passes it to an entry point provided by libemacs.so`. I'm not sure I like the idea of building a shared lib and the extra complexity of making sure the Emacs executable finds it. Stefan