I am attempting to make dereferencing null pointers illegal in my build of xv6. In order to accomplish this, I have made the following changes to the source code:
changed sz = 0
to sz = PGSIZE
on exec.c:42
changed i = 0
to i = PGSIZE
in the function copyuvm() on vm.c:327
added i == 0
to the or conditional in function agrptr() on syscall.c:66
set entrypoint for user code 0x1000 in Makefile:149&156
When I attempt to run xv6 in qemu with these modifications, I get the warning "panic: loaduvm: address should exist" When I run the debugger, this happens the first time loaduvm() is called by the first instance of exec(). If anyone has any pointers as to what I am missing, it would be much appreciated.