Skip to content

fix: x86 fstat testcase fail #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2025
Merged

Conversation

wang-jiahua
Copy link
Collaborator

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

api/src/imp/fs/stat.rs:134

  • The st_size field type changed from u64 to i64; please verify that this signed conversion correctly handles file sizes and won't introduce overflow issues with large values.
st_size: stat.st_size,

api/src/imp/fs/stat.rs:71

  • [nitpick] The updated padding field names (__pad1, __pad2) differ from those in the x86_64 struct; consider standardizing the naming scheme across architectures to improve code clarity.
pub __pad1: u64,

@@ -8,7 +8,7 @@ use starry_core::task::{time_stat_from_kernel_to_user, time_stat_from_user_to_ke
use syscalls::Sysno;

#[register_trap_handler(SYSCALL)]
fn handle_syscall(tf: &TrapFrame, syscall_num: usize) -> isize {
fn handle_syscall(tf: &mut TrapFrame, syscall_num: usize) -> isize {
Copy link
Preview

Copilot AI Apr 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function now accepts a mutable TrapFrame without an accompanying comment explaining why mutations are needed. Please add documentation to clarify this design choice.

Copilot uses AI. Check for mistakes.

@Azure-stars Azure-stars merged commit c883b84 into oscomp:main Apr 16, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants