Skip to content

bpo-31199: configure fails if libasan is not installed when --with-address-sanitizer is enabled#12433

Open
matrixise wants to merge 2 commits intopython:mainfrom
matrixise:bpo-31199
Open

bpo-31199: configure fails if libasan is not installed when --with-address-sanitizer is enabled#12433
matrixise wants to merge 2 commits intopython:mainfrom
matrixise:bpo-31199

Conversation

@matrixise
Copy link
Member

@matrixise matrixise commented Mar 19, 2019

@matrixise
Copy link
Member Author

Just to be sure, I have modified the configure.ac file but I don't know if I need to run autoconf or autoreconf for the update of configure

@pmatos
Copy link

pmatos commented Mar 19, 2019

@matrixise thanks for the pr. I am the bug reporter. Will give this a try.

@pmatos
Copy link

pmatos commented Mar 19, 2019

OK - LGTM

@matrixise
Copy link
Member Author

@Yhg1s In the devguide, I saw you are the expert for the configure.ac file, please when you have time, could you check this PR? Thank you.

@matrixise
Copy link
Member Author

@vstinner or @ned-deily what do you think about this PR?

Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

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

The test is too platform-specific. For one, it fails on current macOS systems with the default clang even though the address sanitizer is available. (Apple no long ships any gcc as part of their developer tools.) Relevant output from config.log:


configure:10043: checking for --with-address-sanitizer
configure:10049: result: yes
configure:10065: checking for malloc in -lasan
configure:10090: clang -o conftest   -fsanitize=address  conftest.c -lasan  -ldl  >&5
conftest.c:102:6: warning: incompatible redeclaration of library function 'malloc' [-Wincompatible-library-redeclaration]
char malloc ();
     ^
conftest.c:102:6: note: 'malloc' is a builtin with type 'void *(unsigned long)'
1 warning generated.
ld: library not found for -lasan
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:10090: $? = 1

If a test is really needed here, perhaps a better approach would be to try to compile, link, and run a skeletal program using AC_RUN_IFELSE. There are examples of its use elsewhere in configure.ac.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@matrixise
Copy link
Member Author

@ned-deily thank you, I will check on my MBP and I will come back with a feedback in maximum 3 days.

@csabella
Copy link
Contributor

@matrixise, friendly reminder of your last comment. 🙂

@csabella
Copy link
Contributor

@matrixise ping

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Sep 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

Comments