ICE gcc_jit_context_new_function name contains invalid character: ''
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
提供された a.rs reproducer を -Zcodegen-backend=gcc -Clink-dead-code=true --crate-type=lib で再実行し、その後 gcc_jit_context_new_function と報告された無効な mangled name から調査を始めます。完了の条件は、reproducer が ICE またはアーカイブのビルド失敗を発生させなくなり、crate が正常にコンパイルされることです。
索引モデルが issue の本文から書いたものです。
説明
struct root_ns1_A;
struct root_ns2_B;
extern "C" {
#[link_name = "\u{1}_ZN4root3ns21B1fERKNS_3ns11AE"]
fn root_ns2_B_f(this: *mut root_ns2_B, a: *mut root_ns1_A);
}
impl root_ns2_B {
unsafe fn f(&mut self, a: *mut root_ns1_A) {
root_ns2_B_f(self, a)
}
}
-Zcodegen-backend=gcc -Clink-dead-code=true --crate-type=lib
warning: type `root_ns1_A` should have an upper camel case name
--> a.rs:1:8
|
1 | struct root_ns1_A;
| ^^^^^^^^^^ help: convert the identifier to upper camel case: `RootNs1A`
|
= note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default
warning: type `root_ns2_B` should have an upper camel case name
--> a.rs:2:8
|
2 | struct root_ns2_B;
| ^^^^^^^^^^ help: convert the identifier to upper camel case: `RootNs2B`
warning: struct `root_ns1_A` is never constructed
--> a.rs:1:8
|
1 | struct root_ns1_A;
| ^^^^^^^^^^
|
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
warning: struct `root_ns2_B` is never constructed
--> a.rs:2:8
|
2 | struct root_ns2_B;
| ^^^^^^^^^^
warning: method `f` is never used
--> a.rs:8:15
|
7 | impl root_ns2_B {
| --------------- method in this implementation
8 | unsafe fn f(&mut self, a: *mut root_ns1_A) {
| ^
warning: function `root_ns2_B_f` is never used
--> a.rs:5:8
|
5 | fn root_ns2_B_f(this: *mut root_ns2_B, a: *mut root_ns1_A);
| ^^^^^^^^^^^^
warning: `extern` block uses type `root_ns2_B`, which is not FFI-safe
--> a.rs:5:27
|
5 | fn root_ns2_B_f(this: *mut root_ns2_B, a: *mut root_ns1_A);
| ^^^^^^^^^^^^^^^ not FFI-safe
|
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
= note: this struct has unspecified layout
note: the type is defined here
--> a.rs:2:1
|
2 | struct root_ns2_B;
| ^^^^^^^^^^^^^^^^^
= note: `#[warn(improper_ctypes)]` on by default
warning: `extern` block uses type `root_ns1_A`, which is not FFI-safe
--> a.rs:5:47
|
5 | fn root_ns2_B_f(this: *mut root_ns2_B, a: *mut root_ns1_A);
| ^^^^^^^^^^^^^^^ not FFI-safe
|
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
= note: this struct has unspecified layout
note: the type is defined here
--> a.rs:1:1
|
1 | struct root_ns1_A;
| ^^^^^^^^^^^^^^^^^
libgccjit.so: error: : gcc_jit_context_new_function: name "_ZN4root3ns21B1fERKNS_3ns11AE" contains invalid character: ''
gcc_jit_function_get_address: NULL function
gcc_jit_function_get_param_count: NULL function
gcc_jit_function_get_return_type: NULL function_type
libgccjit.so: error: : gcc_jit_function_new_local: NULL type
libgccjit.so: error: : gcc_jit_context_new_call: NULL function
libgccjit.so: error: : gcc_jit_block_add_assignment: NULL lvalue
gcc_jit_lvalue_as_rvalue: NULL lvalue
error: failed to build archive at `liba.rlib`: failed to open object file: No such file or directory (os error 2)
error: aborting due to 1 previous error; 8 warnings emitted
- 主要言語
- Rust
- スター
- 1.2k
- フォーク
- 105
- 平均マージ
- 5時間 50分
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rust-lang/rustc_codegen_gcc のほかの issue
-
tests
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
rust-lang/rustc_codegen_gcc#993 ·
メンテナーはふだん 1 日以内に返信
-
Cannot compile sysroot if having a build.build-dir cargo config対応中かも @GuillaumeGomez が 5 日前に担当しました。 オープン
rust-lang/rustc_codegen_gcc#1011 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
tests
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
rust-lang/rustc_codegen_gcc#992 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
rust-lang/rustc_codegen_gcc#970 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
rust-lang/rustc_codegen_gcc#943 ·
メンテナーはふだん 1 日以内に返信
rust-lang/rustc_codegen_gcc の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
rust-bitcoin/rust-bitcoin#7089 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
area/tools bug session-analysis
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Python OpenTelemetrySectionConfig has no file_sinks再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
NVIDIA/NeMo-Relay#1514 ·
メンテナーはふだん 1 日以内に返信
-
prompting proposal tool triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
can1357/oh-my-pi#17041 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
nix-community/fenix#262 ·