希望能够抑制AddressSanitizer检测到的以下错误。
==114064==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffe60fee2f0 at pc 0x000001e6ef34 bp 0x7ffe60feb6c0 sp 0x7ffe60feb6b8
WRITE of size 8 at 0x7ffe60fee2f0 thread T0
#0 0x1e6ef33 in std::_Function_base::_Function_base() /opt/gcc-8.2.0/include/c++/8.2.0/bits/std_function.h:252
#1 0x1e6ef33 in function<Engine::Engine(const Resource&, SourceDataVersion, Engine::CalculationResolution)::<lambda(std::unique_ptr<const model::Car>)> > /opt/gcc-8.2.0/include/c++/8.2.0/bits/std_function.h:668
...
我在考虑设置 ASAN_OPTIONS=suppressions=asan_blacklist.txt,其中 asan_blacklist.txt 包含:
interceptor_via_fun:_Function_base
根据文档的说法,会奏效。
interceptor_via_fun:NameOfCFunctionToSuppress
但是实际上并不会。惊讶地看到在谷歌搜索“AddressSanitizer interceptor_via_fun”时只返回了151个结果。:/
我应该在我的抑制文件中放什么?