Skip to content

gh-75382: Fail configure early if a sanitizer cannot be linked - #159496

Open
vasiliyk wants to merge 1 commit into
python:mainfrom
vasiliyk:gh-75382-sanitizer-link-check
Open

vasiliyk wants to merge 1 commit into
python:mainfrom
vasiliyk:gh-75382-sanitizer-link-check

Conversation

@vasiliyk

@vasiliyk vasiliyk commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

--with-*-sanitizer puts -fsanitize=.... into LDFLAGS unchecked, so a missing sanitizer runtime makes configure fail on unrelated checks.

This PR links an empty program right after the flags are set and fails with a clear message if that does not work.

I added checks for all sanitizer options. For msan and hwasan replaced AX_CHECK_COMPILE_FLAG, which only compiled and could not catch missing runtime.

Supersedes #12433 that was closed as stale.

Link a test program after each --with-*-sanitizer option and stop with
a clear error if the flag is unsupported or the runtime is missing.
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.

1 participant