mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Add test of reading cstring syscall argument which never terminates before hitting end of ram
This commit is contained in:
parent
b1b4cbf583
commit
0018bdd249
4 changed files with 31 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue