Skip to content

Should ASAN build use -shared-libsan? #155375

Description

@lucascolley

@isuruf do I understand you correctly at scipy/scipy#24066 (comment) 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions