Skip to content

gh-157354: Honor disabled sanitizer configure options - #157355

Open
lpyu001 wants to merge 5 commits into
python:mainfrom
lpyu001:configure2
Open

lpyu001 wants to merge 5 commits into
python:mainfrom
lpyu001:configure2

Conversation

@lpyu001

@lpyu001 lpyu001 commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Honor =no and --without-... for all four sanitizer options while preserving the existing behavior for other explicitly supplied values.

@StanFromIreland

Copy link
Copy Markdown
Member

Please update the branch, and include HWAsan.

@lpyu001

lpyu001 commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Also fix test.support.check_sanitizer() so --with-<X>-sanitizer=no builds are not detected as sanitizer builds.

@StanFromIreland StanFromIreland changed the title gh-157354 : Honor disabled sanitizer configure options gh-157354: Honor disabled sanitizer configure options Oct 24, 2026
Comment thread Lib/test/test_support.py Outdated


class TestSupport(unittest.TestCase):
def test_check_sanitizer_config_args(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this down, at least past the classmethods. Honestly, however, I think we can drop it entirely.

Comment on lines +1 to +3
Honor ``=no`` and ``--without-...`` for the AddressSanitizer,
HWAddressSanitizer, MemorySanitizer, UndefinedBehaviorSanitizer, and
ThreadSanitizer configure options without adding sanitizer flags.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Honor ``=no`` and ``--without-...`` for the AddressSanitizer,
HWAddressSanitizer, MemorySanitizer, UndefinedBehaviorSanitizer, and
ThreadSanitizer configure options without adding sanitizer flags.
Fix the :samp:`--with-{name}-sanitizer=no` and :samp:`--without-{name}-sanitizer`
:program:`configure` options enabling the sanitizer instead of disabling it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants