【发布时间】:2016-08-15 14:34:05
【问题描述】:
我想将 GCC 的消毒剂用于本机模块。
我使用链接选项:
-static-libasan -static-libtsan -static-liblsan -static-libubsan -fsanitize=address -lasan -lubsan
当我加载本机模块时,它会打印错误消息:
ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
现在这似乎静态标志不起作用。 是否可以仅对共享对象使用 sanitizer,还是必须将 sanitizer 直接链接到 python3?
【问题讨论】:
-
另见开发者手册中的27. Dynamic Analysis with Clang。当只有 Clang 提供消毒剂时,它被写回了。
标签: python python-3.x gcc address-sanitizer