Skip to content

=no values for sanitizer configure options still enable sanitizer flags #157354

Description

@lpyu001

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions