警告:禁用地址空间随机化时出错:不允许操作
我做错了(或没有做过)gdb
对我而言无法正常工作?
root@6be3d60ab7c6:/# cat minimal.c int main()
{
int i = 1337;
return 0;
}
root@6be3d60ab7c6:/# gcc -g minimal.c -o minimal
root@6be3d60ab7c6:/# gdb minimal
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
.
.
.
Reading symbols from minimal...done.
(gdb) break main
Breakpoint 1 at 0x4004f1: file minimal.c, line 3.
(gdb) run
Starting program: /minimal
warning: Error disabling address space randomization: Operation not permitted
During startup program exited normally.
(gdb)
(gdb) print i
No symbol "i" in current context.
回答:
如果您使用的是Docker,则可能需要该--security-opt seccomp=unconfined
选项(以及启用ptrace):
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
以上是 警告:禁用地址空间随机化时出错:不允许操作 的全部内容, 来源链接: utcz.com/qa/407299.html