posixmodule "undeclared function" error when compiling with sanitizer options on Termux (Android)
オープン
まだ誰も着手していません。
build
extension-modules
OS-android
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Python fails to compile when compiling with the sanitizer option.
Python/fileutils.c:458:1: warning: unused function 'decode_current_locale' [-Wunused-function] 458 | decode_current_locale(const char* arg... | ^~~~~~~~~~~~~~~~~~~~~
Python/fileutils.c:677:1: warning: unused function 'encode_current_locale' [-Wunused-function] 677 | encode_current_locale(const wchar_t *t... | ^~~~~~~~~~~~~~~~~~~~~ 2 warnings generated.
./Modules/posixmodule.c:10400:15: error: call to undeclared function 'wait3'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 10400 | pid = wait3(&status, options, &ru); | ^ 1 error generated. make: ***
[Makefile:3808: Modules/posixmodule.o] Error 1 make: *** Waiting for unfinished jobs...
clang option use.
aarch64-linux-android-clang -fsanitize=address -fsanitize=undefined
aarch64-linux-android-clang++ -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr
aarch64-linux-android-clang --version
clang version 21.1.3
Target: aarch64-unknown-linux-android24
Thread model: posix
InstalledDir: /data/data/com.termux/files/usr/bin
.git revision is at bedaea05987738c4c6b958d19cec9621bec09f07
Compiling with no sanitizer option works.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Modules/posixmodule.c の、10400 行付近で報告されている wait3 呼び出しの周辺から始め、提供されている Termux clang sanitizer コマンドと、比較用の sanitizer なしの構成でビルドを再現します。完了条件は、CPython が sanitizer オプションを使用して、未宣言関数エラーなしにコンパイルできることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- android, c, python
- 領域
- build-system, operating-systems
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 48/100