Dynamic Analysis with Clang building python make unittest failed
未关闭
还没有人认领这个 Issue。
needs: decision
topic-building python
topic-test
type-feature
- 主要语言
- Python
- 星标
- 2.1k
- 派生
- 1k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 12
描述
use this way to enable sanitizers make unittest check Sanitizer failed; it use _cflags to check
_cflags = sysconfig.get_config_var('CFLAGS') or ''
_config_args = sysconfig.get_config_var('CONFIG_ARGS') or ''
MEMORY_SANITIZER = (
'-fsanitize=memory' in _cflags or
'--with-memory-sanitizer' in _config_args
)
ADDRESS_SANITIZER = (
'-fsanitize=address' in _cflags
)
should replace with configure option
--with-address-sanitizer
enable AddressSanitizer memory error detector,
'asan' (default is no)
--with-memory-sanitizer enable MemorySanitizer allocation error detector,
'msan' (default is no)
--with-undefined-behavior-sanitizer
enable UndefinedBehaviorSanitizer undefined
behaviour detector, 'ubsan' (default is no)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先定位读取 sysconfig CFLAGS 和 CONFIG_ARGS 的 Python unittest sanitizer 检查。将其与为 AddressSanitizer、MemorySanitizer 和 UndefinedBehaviorSanitizer 列出的 configure 选项进行比较,然后运行 make unittest check,以确认 sanitizer 检测在使用这些选项时能够正常工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- build-system, testing
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100