如何在 godbolt.org 启用地址清理器



我正在尝试使用 -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

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

如何正确启用地址清理器?

根据设计,Asan在启动时分配了大量的虚拟内存(在x86_64计算机上为20 Tb((详细信息在这里(。如果禁用了过度使用或使用 ulimit -v 限制虚拟内存,则这可能是一个问题。

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

最新更新