python / python/cpython

Should ASAN build use `-shared-libsan`?

オープン
#155,375 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

build type-feature
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

@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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

configure.ac の address_sanitizer オプションから始め、リンクされている PR gh-155420 の議論を読んでください。-shared-libsan が CPython のサポート対象プラットフォーム、特に Linux に適しているかを確認し、結果として得られる ASAN ビルドの動作を検証してください。プラットフォームの対象範囲と必要な設定変更が文書化または実装されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。