Given the fact that local variables inside a function in C get pushed to the stack once the function is called (After pushing the variables being passed to the function), is there any limit to the quantity of said variables before the stack buffer overflows? Or that limit is just given by the amount of RAM a determined host has?
I've tried to test this by creating a 4,6gb .C file with a single function having 25000*13 variables declared and initialized to 0. Said function is called inside main()
but it compiled just fine (With -O0) and it didn't crash.