python / python/cpython

Interpreter segfaults when LC_CTYPE is unsupported on Linux s390x

未關閉
#98,715 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

interpreter-core type-crash
主要語言
Python
星號
77.2k
分支
36k
PR 合併指標
PR 指標待擷取

描述

Crash report

set LC_CTYPE to an unsupported locale, e.g.

export LC_CTYPE=UTF-8

You should hopefully get -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory. If not, set LC_CTYPE to something random, e.g. foobar.

Start python REPL => segfault.

Error messages

Enter any relevant error message caused by the crash, including a core dump if there is one.

Your environment

  • CPython versions tested on: 3.7.13, 3.8.13, 3.9.12
  • Operating system and architecture: Linux s390x
  • Running in a conda env. Unsetting LC_CTYPE fixes the problem, in the same env. (System Python3 not available/installable on the available machine unfortunately.)

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先,在 LC_CTYPE 設定為不支援的值時,使用 CPython 3.7.13、3.8.13 或 3.9.12 在 Linux s390x 上重現當機,然後將其與取消設定 LC_CTYPE 後的相同環境進行比較。在回報的 locale 設定下啟動 Python REPL 不再發生 segmentation fault,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
c, python
領域
operating-systems
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。