禁用内存地址随机化 [英] Disable randomization of memory addresses

查看:156
本文介绍了禁用内存地址随机化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试调试使用很多指针的二进制文件.有时为了快速查看输出以找出错误,我打印了对象的地址及其对应的值,但是对象地址是随机的,这违背了快速检查的目的. 有没有一种方法可以暂时/永久禁用此功能,以便每次运行该程序时都获得相同的值.

I'm trying to debug a binary that uses a lot of pointers. Sometimes for seeing output quickly to figure out errors, I print out the address of objects and their corresponding values, however, the object addresses are randomized and this defeats the purpose of this quick check up. Is there a way to disable this temporarily/permanently so that I get the same values every time I run the program.

糟糕.操作系统是Linux fsttcs1 2.6.32-28-generic #55-Ubuntu SMP Mon Jan 10 23:42:43 UTC 2011 x86_64 GNU/Linux

推荐答案

在Ubuntu上,可以通过...禁用它.

On Ubuntu , it can be disabled with...

echo 0 > /proc/sys/kernel/randomize_va_space

在Windows上,这篇文章可能会有所帮助...

On Windows, this post might be of some help...

http://blog .didierstevens.com/2007/11/20/quickpost-another-funny-vista-trick-with-aslr/

这篇关于禁用内存地址随机化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆