[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Building Emacs on WSL
From: |
Paul Eggert |
Subject: |
Re: Building Emacs on WSL |
Date: |
Tue, 20 Dec 2016 11:35:31 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
On 12/20/2016 04:40 AM, Fabrice Popineau wrote:
(gdb) run --batch --load loadup bootstrap
Starting program: /mnt/d/Source/emacs/build-emacs-ubuntu/src/temacs
--batch --load loadup bootstrap
warning: Error disabling address space randomization: Succès
This is a warning from GDB, not from Emacs. GDB normally attempts to
disable ASLR, to make debugging easier. Looking at the sequence of
system calls in GDB 7.12, GDB calls 'personality' in some funky and
undocumented ways, e.g., GDB assumes that errno is not changed when
'personality' succeeds.
Please compile and run the attached program under WSL, using the same
flags you use to compile Emacs, and let me know what it does. On Fedora
24 x86-64, this program outputs:
personality (0xffffffff) returns 0x0, errno=0 (Success)
ADDR_NO_RANDOMIZE was clear
personality (pers | ADDR_NO_RANDOMIZE) returns 0x0, errno=0 (Success)
ADDR_NO_RANDOMIZE set successfully
When run under GDB, the same program outputs:
personality (0xffffffff) returns 0x40000, errno=0 (Success)
ADDR_NO_RANDOMIZE was set
because GDB already disabled ASLR. You can look at GDB's file
gdb/nat/linux-personality.c to see how GDB differs from Emacs in this
area; perhaps there's something there that Emacs can use to figure out
that it is running with a buggy kernel.
there is a simple fix:
That fix cannot be installed as-is since ASLR needs to be disabled on
ordinary GNU/Linux platforms. It appears that WSL pretends to support
the Linux 'personality' system call and its ADDR_NO_RANDOMIZE flag, and
that this support does not actually work and makes Emacs crash.
personality.c
Description: Text document
- Re: Building Emacs on WSL, (continued)
- Re: Building Emacs on WSL, Paul Eggert, 2016/12/16
- Re: Building Emacs on WSL, Eli Zaretskii, 2016/12/16
- Re: Building Emacs on WSL, Angelo Graziosi, 2016/12/16
- Re: Building Emacs on WSL, Eli Zaretskii, 2016/12/17
- Re: Building Emacs on WSL, Angelo Graziosi, 2016/12/17
- Re: Building Emacs on WSL, Eli Zaretskii, 2016/12/17
- Re: Building Emacs on WSL, Eli Zaretskii, 2016/12/17
- Re: Building Emacs on WSL, Angelo Graziosi, 2016/12/17
Re: Building Emacs on WSL, Fabrice Popineau, 2016/12/20
- Re: Building Emacs on WSL, Fabrice Popineau, 2016/12/20
- Re: Building Emacs on WSL,
Paul Eggert <=
- Re: Building Emacs on WSL, Fabrice Popineau, 2016/12/20
- Re: Building Emacs on WSL, Angelo Graziosi, 2016/12/20
- Re: Building Emacs on WSL, Paul Eggert, 2016/12/20
- Re: Building Emacs on WSL, Angelo Graziosi, 2016/12/21
- Re: Building Emacs on WSL, Paul Eggert, 2016/12/21
- Re: Building Emacs on WSL, Angelo Graziosi, 2016/12/21
Re: Building Emacs on WSL, Angelo Graziosi, 2016/12/20
Re: Building Emacs on WSL, Angelo Graziosi, 2016/12/21
Re: Building Emacs on WSL, Fabrice Popineau, 2016/12/21
Re: Building Emacs on WSL, Angelo Graziosi, 2016/12/20