unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Ulrich Mueller <ulm@gentoo.org>, 32083@debbugs.gnu.org
Cc: Tobias Klausmann <klausman@gentoo.org>
Subject: bug#32083: 26.1.50; temacs bootstrap execs itself forever on alpha-unknown-linux-gnu
Date: Sat, 7 Jul 2018 11:03:40 -0700	[thread overview]
Message-ID: <75b469a6-1b85-61e5-9f37-de76c59754e3@cs.ucla.edu> (raw)
In-Reply-To: <23360.58595.802485.895922@a1i15.kph.uni-mainz.de>

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

Thanks for the bug report. Please try the attached patch; if it works around the 
bug for you, I'll install it on the emacs-26 branch and it should appear in the 
next Emacs release.

It would also be helpful to file a bug report with the Alpha Linux kernel folks, 
as there does seem to be a kernel bug here (or at least, an unexpected 
inconsistency with x86-64 with respect to how process personalities survive exec).

[-- Attachment #2: 0001-Fix-bootstrap-infloop-in-GNU-Linux-alpha.patch --]
[-- Type: text/x-patch, Size: 1035 bytes --]

From 13726cbac681e442649de1dfd73fcc7f889e87d9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat, 7 Jul 2018 10:59:22 -0700
Subject: [PATCH] Fix bootstrap infloop in GNU/Linux alpha

* src/emacs.c (main): Do not re-exec if EMACS_HEAP_EXEC
is already set (Bug#32083).
---
 src/emacs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/emacs.c b/src/emacs.c
index 017c62308c..f5e47428ef 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -707,10 +707,12 @@ main (int argc, char **argv)
   bool disable_aslr = dumping;
 # endif
 
-  if (disable_aslr && disable_address_randomization ())
+  if (disable_aslr && disable_address_randomization ()
+      && !getenv ("EMACS_HEAP_EXEC"))
     {
       /* Set this so the personality will be reverted before execs
-	 after this one.  */
+	 after this one, and to work around an re-exec loop on buggy
+	 kernels (Bug#32083).  */
       xputenv ("EMACS_HEAP_EXEC=true");
 
       /* Address randomization was enabled, but is now disabled.
-- 
2.17.1


  reply	other threads:[~2018-07-07 18:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-07 15:28 bug#32083: 26.1.50; temacs bootstrap execs itself forever on alpha-unknown-linux-gnu Ulrich Mueller
2018-07-07 16:05 ` Ulrich Mueller
2018-07-07 18:03   ` Paul Eggert [this message]
2018-07-07 22:30     ` Ulrich Mueller
2018-07-08 16:05       ` Paul Eggert
2018-07-08 18:51 ` 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=75b469a6-1b85-61e5-9f37-de76c59754e3@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=32083@debbugs.gnu.org \
    --cc=klausman@gentoo.org \
    --cc=ulm@gentoo.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).