ICE gcc_jit_context_new_function name contains invalid character: ''
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Chạy lại reproducer a.rs được cung cấp với -Zcodegen-backend=gcc -Clink-dead-code=true --crate-type=lib, sau đó bắt đầu từ gcc_jit_context_new_function và mangled name không hợp lệ được báo cáo. Được xem là hoàn tất khi reproducer không còn gây ra ICE hoặc lỗi build archive và crate biên dịch thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Rust
- Star
- 1.2k
- Fork
- 105
- Merge trung bình
- 10 giờ 31 phút
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rust-lang/rustc_codegen_gcc
-
Re-enable -fno-lto testĐang mởtests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
rust-lang/rustc_codegen_gcc#993 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Cannot compile sysroot if having a build.build-dir cargo configCó thể đã có người làm @GuillaumeGomez đã nhận 7 ngày trước. Đang mở
rust-lang/rustc_codegen_gcc#1011 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Enable librsvg tests on Aarch64Đang mởtests
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
rust-lang/rustc_codegen_gcc#992 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
rust-lang/rustc_codegen_gcc#970 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support `#[no_builtin]`Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
rust-lang/rustc_codegen_gcc#943 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rust-lang/rustc_codegen_gcc
Issue tương tự
-
desktop documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
vfarcic/dot-agent-deck#2008 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
L: javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dependabot/dependabot-core#16744 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
nautechsystems/nautilus_trader#5486 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bump rustls-webpki, webpki-roots and webpki-root-certs for the emSign distrust (CVE-2026-111943)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày