Loading [MathJax]/jax/output/CommonHTML/config.js
社区首页 >问答首页 >Windows Bash - Emacs构建失败:启用内存保护

Windows Bash - Emacs构建失败:启用内存保护
EN

Stack Overflow用户
提问于 2016-08-11 12:15:42
回答 1查看 815关注 0票数 2

我试图在WinBash中编译emacs-24.4 (WinBash?Win-Bash?但是,遇到windows似乎启用了内存保护的问题,破坏了emacs的构建。

在“make”(./configure works )之后,我遇到的错误是:

代码语言:javascript
代码运行次数:0
复制
Dumping under the name emacs
**************************************************
Warning: Your system has a gap between BSS and the
heap (25164600 bytes).  This usually means that exec-shield
or something similar is in effect.  The dump may
fail because of this.  See the section about
exec-shield in etc/PROBLEMS for more information.
**************************************************
/bin/bash: line 7:  6853 Segmentation fault      (core dumped) ./temacs --batch --load loadup bootstrap
make[1]: *** [bootstrap-emacs] Error 1
make[1]: Leaving directory `/home/tdwyer/bin/emacs-24.5_linux_build/src'
make: *** [src] Error 2

在etc/PROBLEMS文件中,相关部分提供了:

代码语言:javascript
代码运行次数:0
复制
*** Segfault during `make bootstrap' under the Linux kernel.

In Red Hat Linux kernels, "Exec-shield" functionality is enabled by
default, which creates a different memory layout that can break the
emacs dumper.  Emacs tries to handle this at build time, but if this
fails, the following instructions may be useful.

Exec-shield is enabled on your system if

    cat /proc/sys/kernel/exec-shield

prints a value other than 0.  (Please read your system documentation
for more details on Exec-shield and associated commands.)

Additionally, Linux kernel versions since 2.6.12 randomize the virtual
address space of a process by default.  If this feature is enabled on
your system, then

   cat /proc/sys/kernel/randomize_va_space

prints a value other than 0.

When these features are enabled, building Emacs may segfault during
the execution of this command:

    ./temacs --batch --load loadup [dump|bootstrap]

To work around this problem, you can temporarily disable these
features while building Emacs.  You can do so using the following
commands (as root).  Remember to re-enable them when you are done,
by echoing the original values back to the files.

    echo 0 > /proc/sys/kernel/exec-shield
    echo 0 > /proc/sys/kernel/randomize_va_space

Or, on x86, you can try using the `setarch' command when running
temacs, like this:

    setarch i386 -R ./temacs --batch --load loadup [dump|bootstrap]

or

    setarch i386 -R make

(The -R option disables address space randomization.)

而且,毫不奇怪,如果我想看看是否启用了..。它是:

代码语言:javascript
代码运行次数:0
复制
$ cat /proc/sys/kernel/randomize_va_space
2

但不幸的是,我试图禁用它(甚至作为管理员运行bash ),它失败了:

代码语言:javascript
代码运行次数:0
复制
$ sudo echo 0 > /proc/sys/kernel/randomize_va_space
bash: /proc/sys/kernel/randomize_va_space: Permission denied

此外,setarch使用以下方法无法工作:

代码语言:javascript
代码运行次数:0
复制
setarch x86_84 -R make 

有什么建议吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-08-18 11:36:54

查看说明,请访问:https://askubuntu.com/questions/318315/how-can-i-temporarily-disable-aslr-address-space-layout-randomization

重要部分:

若要禁用它,请运行 回波0\ sudo tee /proc/sys/核/随机化_va_space 若要再次启用它,请运行 echo 2\ sudo tee /proc/sys/核/随机化_va_space

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38905344

复制
相关文章
Bash On Windows 安装教程
Bash On Windows 是微软的 Microsoft Love Linux 计划中重要的一环,目的是能让 Windows 用户能在系统中运行 Linux 子系统,也就是说你可以直接在 Windows 中获得原生 Linux Bash 级别的体验。
Kindem
2022/08/12
2K0
Bash On Windows 安装教程
Bash on Windows各种配置
(注意这个只是给 Ubuntu16.04 版本使用, 你安装的时候应该默认就是这个版本)
szhshp
2022/09/21
3090
【Windows】Windows 10系统启用Windows沙盒
5、重启后,在开始菜单中找到“Windows Sandbox”,点击运行即可。
宝耶需努力
2022/12/13
3.9K0
【Windows】Windows 10系统启用Windows沙盒
如何在Windows中运行bash
当微软宣布,将在Windows10上面支持bash时,所有的Unix命令行用户都为之雀跃了。上周三,微软发布了一个测试版本,开始支持了这项功能。 为了运行bash,首先要进行几步操作。首先,需要获得Windows10的build 14316。 安装内测版本之后,用户需要切换到开发者模式,从设置>更新(Settings > Updates),安全>开发者(Security > For Developers)打开新的设置页面,选择“Windows Subsystem for Linux (Beta)”,重启
CSDN技术头条
2018/02/11
3.8K0
如何在Windows中运行bash
windows chromedriver 下载失败
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
云雀叫了一整天
2019/09/29
1.1K0
配置Git for windows(Git bash)登录GitHub
输入完以后一直默认即可,屏幕上会显示密钥的存放位置,默认是在 C:\Users\xxx.ssh 里面,xxx指的是用户名。
鸣奔博客
2023/03/23
2.2K0
Emacs Lisp
然后为了印证我的所学,我自己写了一个小函数,用于这篇文章中输入两个由 ~~~ 来标识的代码块
franket
2021/08/10
2.2K0
在Windows Server 2016 中启用 Flash
最近在部署测试VMware Horizon,其控制台默认需要Flash,但是Windows Server 2016默认没有启用Flash,在原来Windows Server 2012的时候,我们可以通过安装“桌面体验”功能来启用Flash,但此功能在Windows Server 2016中消失了。
SuperDream
2019/02/28
1.7K0
在 Windows 系统上启用远程应用
需要一个远程桌面 App 进行演示, 安装 Windows 远程桌面服务太折腾, 需要安装域控制器, 再部署一整套的远程服务, 太折腾了, 如果只是演示的话, 没必要那么折腾。
beginor
2020/08/07
3.4K0
GPG in Emacs
Pretty Good Privacy (PGP) 是一款诞生于 1991 年的,一款用于认证、加密的一款软件,现如今已经有了标准化协议 OpenPGP,最常用的实现是 GnuPG,一般提到 GPG 时都是指的 GnuPG。
飞驰的西瓜
2022/07/26
9780
GPG in Emacs
Made with Emacs
最近在看 sacha chua 的 Emacs News[1] 时,无意间看到一个『 Made with Emacs 』的图片,觉得很有趣:
飞驰的西瓜
2023/09/06
1760
Made with Emacs
在 shell 中使用 vi 模式
糖豆贴心提醒,本文阅读时间4分钟 作为一名大型开源社区的参与者,更确切地说,作为 Fedora 项目的成员,我有机会与许多人会面并讨论各种有趣的技术主题。 我最喜欢的主题是“命令行”或者说 shell,因为了解人们如何熟练使用 shell 可以让你深入地了解他们的想法,他们喜欢什么样的工作流程,以及某种程度上是什么激发了他们的灵感。 许多开发和运维人员在互联网上公开分享他们的“ dot 文件”(他们的 shell 配置文件的常见俚语),这将是一个有趣的协作机会,让每个人都能从对
小小科
2018/05/02
1.4K0
在 shell 中使用 vi 模式
Apache Kylin 2.3 构建Cube失败
1、问题 需要查看错误日志 [root@node1 ~]# cd /opt/kylin-2.3.1/logs/ [root@node1 logs]# ll total 1664 -rw-r--r-- 1 root root 16674 May 30 08:18 kylin.gc.20356.0.current -rw-r--r-- 1 root root 6801 May 29 09:22 kylin.gc.31042.0.current -rw-r--r-- 1 root root 1
程裕强
2022/05/06
7260
Apache Kylin 2.3 构建Cube失败
网站数据库无法打开 phpMyAdmin启用失败 解决
最近突然网站后台的数据库无法打开,尝试 各种方法,更换PHP版本,卸载、重装phpAdmin都无济于事,最后发现是安全组问题。
梦溪
2021/08/09
2.1K0
istio 常见问题: 启用 Smart DNS 后解析失败
在启用了 istio 的 Smart DNS (智能 DNS) 后,我们发现有些情况下 DNS 解析失败,比如:
imroc
2021/05/04
6.3K0
Windows终端好难用? 试试git bash吧!
说起来有些滑稽, "如何在Windows终端使用Linux命令"是一个长盛不衰的问题, 在试过一些'Windows版的Linux命令行工具后", 我最终选择了git bash gitbash下载安
zhaoolee
2018/06/13
2.8K0
Emacs 显示行数
2  复制 linum.el 到“/usr/share/emacs/site-lisp/”或者其他 load-path路径下
阳光岛主
2019/02/19
2.5K0
Emacs Lisp
前言Lisp 是一门很古老的语言LISP 是具有悠久历史的计算机编程语言家族,有独特和完全括号的前缀符号表示法,起源于1958年,是现今第二悠久而仍广泛使用的高级编程语言,只有 FORTRAN 编程语言比它更早一年,LISP 编程语族已经演变出许多种方言,现代最著名的通用编程语种是 Common Lisp 和 Scheme , 以上解释来自 WIKIEmacs Lisp 是 Lisp 的一个分支Emacs Lisp,一种直译式的脚本语言,为LISP的方言之一,GNU Emacs与XEmacs文字编辑器都使用
franket
2022/07/10
6210
Emacs Lisp
然后为了印证我的所学,我自己写了一个小函数,用于这篇文章中输入两个由 ~~~ 来标识的代码块
franket
2021/08/10
2.3K0
Emacs 折腾记
作为一名在 Windows 下使用了多年 gVim 的少年,已然把它在我需要的地方都收拾得服服贴贴,可以说 Vim 经过配置配置,上得厅堂下得厨房,基本能满足我的所有幻想。
mzlogin
2020/04/16
1.9K0

相似问题

Windows内核内存保护

22

Windows、Emacs、Git Bash和shell命令

34

Windows 7上的Emacs构建过程

10

OSX/Bash -检测构建失败

30

如何在Windows 10 Bash上使用X Windows和Emacs?

32
添加站长 进交流群

领取专属 10元无门槛券

AI混元助手 在线答疑

扫码加入开发者社群
关注 腾讯云开发者公众号

洞察 腾讯核心技术

剖析业界实践案例

扫码关注腾讯云开发者公众号
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文