简体   繁体   English

如何在 Godbolt.org 上启用地址清理程序

[英]How to enable address sanitizer at godbolt.org

I am trying to enable address sanitizer at godbolt.org with -fsanitize=address , but get error:我正在尝试使用-fsanitize=address在 Godbolt.org 上启用地址清理程序,但出现错误:

==3==ERROR: AddressSanitizer failed to allocate 0xdfff0001000 (15392894357504) bytes at address 2008fff7000 (errno: 12)
==3==ReserveShadowMemoryRange failed while trying to map 0xdfff0001000 bytes. Perhaps you're using ulimit -v

Example: https://godbolt.org/z/5GDtrr示例: https : //godbolt.org/z/5GDtrr

How can I enable address sanitizer correctly?如何正确启用地址清理程序?

By design Asan allocates a huge amount of virtual memory (20 Tb on x86_64 machines) at start (details here ).按照设计,Asan 在启动时分配了大量虚拟内存(x86_64 机器上为 20 Tb)(详情请点击此处)。 This may be a problem if overcommit is disabled or virtual memory is limited with ulimit -v .如果禁用过量使用使用 ulimit -v 限制虚拟内存,这可能是一个问题。

In both cases there's nothing Asan can do - you'll need to raise this with Godbolt VM maintainers in https://github.com/mattgodbolt/compiler-explorer/issues在这两种情况下,Asan 都无能为力 - 您需要在https://github.com/mattgodbolt/compiler-explorer/issues 中向 Godbolt VM 维护者提出此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM