BigExec: Trapframe issue while declaring very large static arrays as buffers.


(Roopali Vij) #1

We are facing an issue while declaring a static array of size argc while running test-10 in bigexec that execs with 3850 8-letter words, where argc becomes 3850.

Assertion failed: (vaddr_t)tf > (vaddr_t)curthread->t_stack, at …/…/arch/mips/locore/trap.c:147

It seems that it is because our program asks for a large space in Kernel mode. We tried using dynamic array as buffer as well but that fails in bigexec while allocating memory word by word to all the words.

Are we working in the right direction? Our execv works for all other cases.


(Geoffrey Challen) #2

When you’re running in the kernel you have a 4K stack. So you can’t allocate large local variables. Either use kmalloc or allocate things as a kernel global variable.


(Roopali Vij) #3

This is resolved now. Thanks for the guidance!