Should ASAN build use `-shared-libsan`?
Open
Nobody has claimed this yet.
build
type-feature
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
@isuruf do I understand you correctly at https://github.com/scipy/scipy/pull/24066#discussion_r3723640806 that you are suggesting the following diff for CPython?
diff --git a/configure.ac b/configure.ac
index 3a9841b1e7d..7b44be75623 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3520,7 +3520,7 @@ AC_ARG_WITH([address_sanitizer],
[
AC_MSG_RESULT([$withval])
BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
-LDFLAGS="-fsanitize=address $LDFLAGS"
+LDFLAGS="-fsanitize=address -shared-libsan $LDFLAGS"
# ASan works by controlling memory allocation, our own malloc interferes.
with_pymalloc="no"
],
Also, is this only necessary on linux?
Linked PRs
- gh-155420
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with configure.ac at the address_sanitizer option and read the discussion in linked PR gh-155420. Check whether -shared-libsan is appropriate for CPython's supported platforms, especially Linux, and verify the resulting ASAN build behavior. Done means the platform scope and required configuration change are documented or implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100