Windows support cleanup: ~1,500 dead lines in structs.rs, bindgen noise in paging.rs

Đang mở
#434 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
45/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust

Hướng nghiên cứu

Start by reading src/os/windows/structs.rs, src/os/windows/paging.rs, and the #![allow(unused)] attribute at src/os/mod.rs:1; verify the reported unused items and bindgen output against the current code. Then inspect collect() and SourceCache::new to trace the repeated process lookup and unconditional source hashing. Done means removing confirmed dead code, addressing the paging noise, and gating source hashing as suggested, with relevant checks passing; the report has not been verified or reproduced under SIMICS.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Where

  • src/os/windows/structs.rs, src/os/windows/paging.rs, src/os/mod.rs:1 (#![allow(unused)])

Problem

  • paging.rs (2520 lines) is bindgen output of a small header: ~250 lines of glibc constants, unused _MMPTE_HARDWARE and setters.
  • structs.rs has unreferenced items: WindowsTeb, WindowsKThread::teb, several WindowsLdrDataTableEntry/WindowsPebLdrData methods.
  • Dead: KernelInfo::process_list (same list-termination bug), DebugInfo::new_dtb, CvInfoPdb70::new_dtb, CpuInstrumentationCbHandle; duplicated find_ps_*_address, near-copy intervals impls.
  • current_process() runs twice per collect(); SourceCache::new hashes every source file even when symbolic_coverage is off.

Impact
Large surface hiding real bugs; slower snapshots.

Suggested fix
Remove #![allow(unused)] and delete what it surfaces; regenerate or hand-write paging bitfields; gate SourceCache on symbolic_coverage.

Status
Reported by static code review at 79972db; not yet re-verified line by line. Found by reading the code; not reproduced under SIMICS.

Ngôn ngữ chính
Rust
Star
335
Fork
26
Merge trung bình
1 ngày 50 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của intel/tsffs

Tất cả issue của intel/tsffs

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.