如何抑制 LeakSanitizer 输出?
对于 Address Sanitizer,我可以使用__attribute__((no_sanitize_address))
如何在 -fsanitize=address 下运行时抑制 LeakSanitizer 报告?
但它不适用于LS。
__attribute__((no_sanitize_address))
std::shared_ptr make_module()
{
return std::shared_ptr(new client);
}
21 Indirect leak of 3670536 byte(s) in 1 object(s) allocated from:
22 #0 0x7fbf42f521a8 in operator new(unsigned long) (/lib64/libasan.so.4+0xe01a8)
23 #1 0x7106b2 in graphite::make_module() /client.cc:15