Size write-back ignores `POINTER_WIDTH_OVERRIDE` (i386 may write 8 bytes into a 4-byte size_t)

Đang mở
#421 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend, security

Hướng nghiên cứu

Read the cited read paths and write_start in src/arch/mod.rs, especially the lines linked in the issue. Compare how they choose the size width and check the existing x86 override; the issue suggests sharing the width helper. Done means write-back uses the override, and the i386 case no longer writes beyond the 4-byte size_t; the issue notes this has not yet been 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

Problem
Read paths honour the override (x86 sets Some(4)), but write_start always uses get_logical_address_width()/8. The write is also always little-endian.

Impact
If the i386 CPU model reports a 64-bit logical width, each iteration zeroes the 4 bytes after the harness's size variable.

Suggested fix
Share one size-width helper between read and write.

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.