Skip to content

Refine the SDL-oriented system calls declaration #102

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
Dec 31, 2022

Conversation

alanjian85
Copy link
Collaborator

Replace the type of all int parameters of system calls with unsigned, because they are usually treated as uint32_t internally by the emulator. And change the name of the parameter "screen" of the "draw_frame" system call to "base" for the sake of consistency with the "setup_queue" system call.

@jserv
Copy link
Contributor

jserv commented Dec 30, 2022

Please read Unsigned Integers Are Dangerous. We have to validate the dimension of SDL window and the corresponding ranges.

@jserv
Copy link
Contributor

jserv commented Dec 30, 2022

@alanjian85 alanjian85 force-pushed the master branch 2 times, most recently from 43a3bd9 to 79827be Compare December 30, 2022 13:51
Replace the type of some system call parameters with signed int and
size_t, and handle handle them properly in the emulator. Change the name
of the parameter "screen" of the "draw_frame" system call to "base" for
the sake of consistency with the "setup_queue" system call.
@jserv jserv merged commit 6010946 into sysprog21:master Dec 31, 2022
vestata pushed a commit to vestata/rv32emu that referenced this pull request Jan 24, 2025
Refine the SDL-oriented system calls declaration
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