@@ -75,12 +75,11 @@ jobs:
7575 echo "MSAN_OPTIONS=${SAN_LOG_OPTION} allocator_may_return_null=1" >> "$GITHUB_ENV"
7676 # MSan reports false positives for memory initialized by libraries
7777 # that are not built with MSan, so disable modules that use them.
78- # _remote_debugging is disabled because it links to libzstd directly.
78+ # _remote_debugging links to libzstd directly, but we unpoision the memory .
7979 {
8080 echo '*disabled*'
8181 echo '_bz2 _ctypes _curses _curses_panel _dbm _decimal _gdbm _hashlib'
82- echo '_lzma _remote_debugging _sqlite3 _ssl _tkinter _uuid _zstd'
83- echo 'readline zlib'
82+ echo '_lzma _sqlite3 _ssl _tkinter _uuid _zstd readline zlib'
8483 } > Modules/Setup.local
8584 env :
8685 SAN_LOG_OPTION : log_path=${{ github.workspace }}/san_log
@@ -108,6 +107,8 @@ jobs:
108107 # gh-157958: -O2 instead of the pydebug default -Og to avoid a clang 21
109108 # compile-time blowup on some interpreter files.
110109 # (https://github.com/llvm/llvm-project/issues/179695)
110+ # MSan uses --with-assertions instead of --with-pydebug because its
111+ # hooks on the Python memory allocators hide uninitialized reads.
111112 - name : Configure CPython
112113 run : >-
113114 ./configure
@@ -120,7 +121,7 @@ jobs:
120121 && '--with-memory-sanitizer'
121122 || '--with-undefined-behavior-sanitizer --with-strict-overflow'
122123 }}
123- --with-pydebug
124+ ${{ inputs.sanitizer == 'MSan' && ' --with-assertions' || '--with- pydebug' }}
124125 ${{ inputs.sanitizer == 'TSan' && '--with-openssl="$OPENSSL_DIR" --with-openssl-rpath=auto' || '' }}
125126 ${{ inputs.free-threading && '--disable-gil' || '' }}
126127 - name : Build CPython
0 commit comments