`=no` values for sanitizer configure options still enable sanitizer flags
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided configure reproduction on the CPython main branch and inspect the sanitizer configure-option handling that adds BASECFLAGS, LDFLAGS, and changes with_pymalloc. Done means passing --with-address-sanitizer=no leaves sanitizer flags and the pymalloc setting unchanged, matching an omitted option or corresponding --without form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100