Add test of reading cstring syscall argument which never terminates before hitting end of ram

This commit is contained in:
Toby Jaffey 2025-12-13 19:12:24 +00:00
parent b1b4cbf583
commit 0018bdd249
4 changed files with 31 additions and 0 deletions

View file

@ -42,6 +42,11 @@ void syscall_gh_test(void) {
syscall((uint32_t)SYSCALL_H, (uint32_t)buf, 32);
}
void syscall_i_test(void) {
char *p = "hello"; // runner will overwrite memory
syscall((uint32_t)SYSCALL_I, (uint32_t)p, 0);
}
void main(void) {
switch(syscall(SYSCALL_PICKTEST, 0, 0)) {
case SYSCALL_A:
@ -62,6 +67,9 @@ void main(void) {
case SYSCALL_G:
syscall_gh_test();
break;
case SYSCALL_I:
syscall_i_test();
break;
}
}