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