地址消毒剂拦截器_via_fun

时间:2018-11-22 09:52:18

标签: c++ gcc address-sanitizer

想抑制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
正如documentation所说,

可以解决问题

interceptor_via_fun:NameOfCFunctionToSuppress

但不是。看到谷歌搜索“ AddressSanitizerinterceptor_via_fun”仅返回151个结果,我感到非常震惊。 :/

我应该在禁止文件中添加什么?

1 个答案:

答案 0 :(得分:0)

您不尝试过这本llvm手册吗?

并添加以下行以取消显示外部库

interceptor_via_lib:NameOfTheLibraryToSuppress