Skip to content
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

Fix type mismatch of argv parameters in initcode.S #211

Open
wants to merge 1 commit into
base: riscv
Choose a base branch
from

Conversation

snoire
Copy link

@snoire snoire commented Oct 25, 2023

In initcode.S, the argv parameters passed to sys_exec were declared as 32-bit long type, which causes a type mismatch with the 64-bit parameter expected by sys_exec. This could introduce undefined behavior if the allocated memory is not cleared.

This PR fixes this by changing the argv parameters to 64-bit quad type. After this change, the memset to clear memory is no longer needed.

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.

None yet

1 participant