warning: Error disabling address space randomization: Operation not permitted

后端 未结 3 541
臣服心动
臣服心动 2020-12-22 20:54

what have i done wrong (or didn\'t do) that gdb is not working properly for me?

root@6be3d60ab7c6:/# cat minimal.c 
int main()
{
  int i = 1337;         


        
3条回答
  •  佛祖请我去吃肉
    2020-12-22 21:20

    Building on wisbucky's answer (thank you!), here are the same settings for Docker compose:

    security_opt:
      - seccomp:unconfined
    cap_add:
      - SYS_PTRACE
    

    The security option seccomp:unconfined fixed the address space randomization warnings.

    The capability SYS_PTRACE didn't seem to have a noticeable effect even though the Docker documentation states that SYS_PTRACE is a capability that is "not granted by default". Perhaps I don't know what to look for.

提交回复
热议问题