`=no` values for sanitizer configure options still enable sanitizer flags
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
Bug report
Bug description:
Summary
Passing no to a sanitizer option is reported as disabled, but the option's action still adds sanitizer compiler and linker flags. For AddressSanitizer, it also disables pymalloc.
Reproduction
mkdir build
cd build
../configure --with-address-sanitizer=no
grep -E '^(BASECFLAGS|LDFLAGS)=' Makefile
grep WITH_PYMALLOC pyconfig.h
Actual Behavior
Configure reports:
checking for --with-address-sanitizer... no
checking for --with-pymalloc... no
Despite that output, the AddressSanitizer action adds -fsanitize=address to BASECFLAGS and LDFLAGS, and sets with_pymalloc=no.
Expected Behavior
--with-address-sanitizer=no should not enable AddressSanitizer flags and should not change the pymalloc setting. It should have the same result as omitting the option or using the corresponding --without-... form.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
- gh-157355
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先在 CPython 的 main 分支上运行所提供的 configure 复现,并检查 sanitizer configure 选项的处理逻辑,该逻辑会添加 BASECFLAGS、LDFLAGS 并更改 with_pymalloc。完成的标准是:--with-address-sanitizer=no 不改变 sanitizer 标志和 pymalloc 设置,与省略该选项或使用对应的 --without 形式时一致。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- build-system
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100