Add a stack canary, setup on boot

This commit is contained in:
Toby Jaffey 2025-12-10 01:00:36 +00:00
parent 9596838a4b
commit 9baedb42e8
21 changed files with 61 additions and 16 deletions

View file

@ -1,5 +1,5 @@
all:
gcc -Wall -pedantic -std=c99 -O2 -DUVM32_MEMORY_SIZE=65535 -I../uvm32 -I../common -o host ../uvm32/uvm32.c host.c
gcc -Wall -Werror -pedantic -std=c99 -O2 -DUVM32_MEMORY_SIZE=65535 -I../uvm32 -I../common -o host ../uvm32/uvm32.c host.c
clean:
rm -f host

View file

@ -202,7 +202,7 @@ int main(int argc, char *argv[]) {
printf("%c", uvm32_getval(&vmst, &evt, ARG0));
break;
case UVM32_SYSCALL_PRINTHEX:
printf("%d", uvm32_getval(&vmst, &evt, ARG0));
printf("%08x", uvm32_getval(&vmst, &evt, ARG0));
break;
case UVM32_SYSCALL_MILLIS: {
clock_t now = clock() / (CLOCKS_PER_SEC / 1000);