Exactly, the manual says the same as Uhrwerk:
Be careful when defining huge local arrays. All local variables are stored on a special memory area called the stack. This area has a limited size that depends on where your function is running and whether it's called by other functions. Exceeding the stack size causes any program to crash . Thus, when you need huge local arrays of ten thousands of variables, or when you want to determine the array size dynamically, use the sys_malloc / sys_free method.
I had to learn this limitation myself the hard way: Many years ago I worked on a puzzle solving algorithm with lite-C and I could not understand why it crashed or even "went the wrong way" on the puzzle board after some 100 iterations. It took me quite literally multiple days to find out that the local array declaration of a function in my recursive program would fail without notice after a certain recursive depth.