[mono] JIT inline access to [ThreadStatic] fields doesn't run the class constructor

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp
領域
backend, testing

調査の方向性

Start with the inline TLS access in src/mono/mono/mini/method-to-ir.c and compare it with the other static-field paths that call emit_class_init. Run the repro in src/tests/JIT/Regression_ro_2/Runtime_136480.cs on a Mono runtime-test lane; done means the result is (0, 0, 1) instead of (0, 0, 0). The issue is open, unassigned, and has no linked pull request.

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

説明

area-Codegen-JIT-mono untriaged

Accessing a [ThreadStatic] field of a class with an explicit static constructor doesn't run the constructor in Mono JIT code. src/mono/mono/mini/method-to-ir.c emits the inline TLS access (is_special_static && thread_ins) without emit_class_init, unlike the other static-field paths.

Repro: src/tests/JIT/Regression_ro_2/Runtime_136480.cs returns (0, 0, 0) instead of (0, 0, 1) on the mono linux/windows/osx runtime-test lanes (build 1652778).

Found while fixing the CoreCLR counterpart, dotnet/runtime#136480 / dotnet/runtime#136535.

[!NOTE]
This issue was drafted with GitHub Copilot.

主要言語
C#
スター
18.4k
フォーク
5.8k
平均マージ
2日 12時間
マージ済み PR(30日)
600

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

dotnet/runtime のほかの issue

dotnet/runtime の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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