ICE normalizing Json::Node while traversing unresolved generic vtable candidates
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 12/100
Hướng nghiên cứu
The crash is in the monomorphization path of the call graph pass: dyn_object_call_to_impl_methods and PostMonoNode::monomorphize_instance in cga-analysis, reached through generate_callgraph. Start by reproducing with the Cargo.toml and cga.toml in the issue, then look at how Instance::try_resolve results are filtered for generic arguments. Done means the ICE no longer occurs, or the analysis reports an explicit unsupported-analysis diagnostic instead.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
CGA crashes with an internal compiler error while analyzing a small binary using jsonschema, rather than reporting potential panics.
Environment:
- CGA commit:
2fc63108f0b674fe7a178191ffa15647a18879f1 - CGA's pinned
nightly-2026-10-18(rustc 1.101.0-nightly,8006091eb) - Linux x86_64
jsonschemaandjsonschema-value0.58.6
Reproducer
Create a binary crate with this Cargo.toml:
[package]
name = "cga-jsonschema-repro"
version = "0.1.0"
edition = "2021"
[dependencies]
jsonschema = { version = "=0.58.6", default-features = false }
serde_json = "1"
[profile.cga]
inherits = "release"
opt-level = 2
src/main.rs:
fn main() {
let schema = serde_json::json!({"type": "string"});
let validator = jsonschema::validator_for(&schema).unwrap();
println!("{}", validator.is_valid(&serde_json::json!("example")));
}
Use this cga.toml:
whitelist = []
blacklist = []
[options]
allow_async_panic = true
allow_assert = false
Run:
cargo cga check --profile cga --config-path cga.toml --target x86_64-unknown-linux-gnu
Actual result: ICE in normalize_erasing_regions.rs:206:13, exit 101:
Failed to normalize Alias(No, Alias { kind: Projection { def_id: ... jsonschema_value::Json::Node }, args: [F/#1, '{erased}], .. })
This also occurs while analyzing the larger SkilJ project. A backtrace there contains:
<rustc_middle::ty::context::TyCtxt>::instantiate_and_normalize_erasing_regions
<cga_analysis::post_mono::PostMonoNode>::monomorphize_instance
<cga_analysis::post_mono::PostMonoNode as rustc_middle::mir::visit::Visitor>::visit_terminator
<cga_analysis::post_mono::PostMonoNode>::visit_instance
<cga_analysis::post_mono::PostMonoNode>::on_edge
...
cga_analysis::post_mono::generate_callgraph
cga_driver::post_mono_pass
Suspected cause / diagnostic workaround
dyn_object_call_to_impl_methods filters the implementation self type for unresolved parameters, but returned Instance arguments can still contain generic parameters. For example:
Instance { def: Item(... jsonschema::keywords::additional_items::{impl#3}::validate), args: [F/#1, '{erased}] }
In a temporary local build, filtering instance_opt after Instance::try_resolve to exclude instances where instance.args.has_non_region_param() || instance.args.has_non_region_infer() avoids this crash and allows SkilJ's core analysis to emit panic diagnostics. This is only a partial-analysis workaround: it skips unresolved generic vtable targets rather than resolving their concrete substitutions, and should not be taken as a sound complete fix.
Expected: handle the generic dispatch without an ICE, or explicitly diagnose unsupported/incomplete analysis.
- Ngôn ngữ chính
- Rust
- Star
- 50
- Fork
- 4
- Merge trung bình
- 4 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 4
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 OpenDevicePartnership/cga
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
OpenDevicePartnership/cga#4 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
OpenDevicePartnership/cga#5 · 1 bình luận ·
Tất cả issue của OpenDevicePartnership/cga
Issue tương tự
-
app bug session
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
macOS autosubmit enable passes unsupported --wait to launchctl bootoutCó thể đã có người làm @iqdoctor đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
junhoyeo/tokscale#1713 · 3 bình luận ·
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
Maintainer thường phản hồi trong vòng 1 ngày