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

Rua*_*ark 4 c++ address-sanitizer

我正在尝试在 Godbolt.org 上使用 启用地址清理程序-fsanitize=address,但出现错误:

==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
Run Code Online (Sandbox Code Playgroud)

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

如何正确启用地址清理程序?

yug*_*ugr 5

按照设计,Asan 在启动时分配了大量虚拟内存(x86_64 机器上为 20 Tb)(详情请点击此处)。如果禁用过量使用使用 ulimit -v 限制虚拟内存,则这可能是一个问题。

在这两种情况下,Asan 都无能为力-您需要在https://github.com/mattgodbolt/compiler-explorer/issues 中向 Godbolt VM 维护者提出此问题

  • 谢谢。得到回复:https://github.com/mattgodbolt/compiler-explorer/issues/1703#issuecomment-557838344 (2认同)