Exec Address Error in mips_usermode

(David Robert Olsen) #1

In exec, I have copied all the input to the user stack(with padding), copied the args pointing to those locations onto the user stack, and even done math(!!) to verify that the stackpointer is at the correct spot when I copyin. However, I am still running into an Address Error in the mips_usermode, and I am not sure why.

This means that when the user program is trying to access it’s arguments, it is probably trying to access an address in kernel space, right?

(Matthew Mc Govern) #2

It could be, a good way to verify this is to dig and make sure these addresses are what you think they are. My partner and I drew out the stack and what all of the expected argument should have been for an example. This made it easy to check in gdb and make sure we were putting things in the right order, and where they should have been.

Doing math is a good start! Do just a little bit more to check that things are in order :slight_smile:

(David Robert Olsen) #3

This may seem like a silly question, but even though the user stack grows down, copyout will copy something to an address specified and copy towards the top(0x80000000), right?

(Matthew Mc Govern) #4

Correct, you could check the implementation of copyout if you want some more confidence.