Glen...
Whilst I cannot quickly answer your question, here is a link to a webpage that provides an explanation as to the use / definition of the Storage Classes (static / extern / etc etc).
As you say, locals are stored upon the stack when the function is called, so if you exceed the stack allocation witin your function it will cause problems, fixed only by extending the size of the stack, or as you did by making them static (i.e. global - note: not file scope global).
Globals (statics and externs use memory space that has been allocated 'off the stack' and hence do not create problems, other than the persistance of the data itself, and the possibilites of memory leaks etc etc...
Quotes:
The auto (which is basically what your locals are) storage class specifier lets
you define a variable with automatic storage; its use and storage is restricted to the current block. The storage class keyword auto is optional in a data declaration. It is not permitted in a parameter declaration. A variable having the auto storage class specifier must be declared within a block. It cannot be used for file scope declarations.
Because automatic variables require storage only while they are actually being used, defining variables with the auto storage class can decrease the amount of memory required to run a program. However, having many large automatic objects may cause you to run out of stack space
I have a series of other links and will post if I can find them...
http://www.tru64unix.compaq.com/faqs/publications/base_doc/DOCUMENTATION/V40F_HTML/AQTLTBTE/DOCU_023.HTM
http://eel.st.usm.edu/~seyfarth/css334/c-6-3-7.html
http://www.psu.edu/dept/cac/ait/nic_group/Soft_Lang/C/VAC/doc/concepts/cudecblk.htm