python / python/cpython

`=no` values for sanitizer configure options still enable sanitizer flags

Offen
#157,354 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

build type-bug
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die bereitgestellte configure-Reproduktion im CPython-main-Branch auszuführen, und untersuche die Behandlung der configure-Optionen für den Sanitizer, die BASECFLAGS und LDFLAGS hinzufügt und with_pymalloc ändert. Als abgeschlossen gilt die Aufgabe, wenn --with-address-sanitizer=no die Sanitizer-Flags und die pymalloc-Einstellung unverändert lässt, entsprechend einer weggelassenen Option oder der entsprechenden --without-Form.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.