I know almost nothing about it ... but it seems to me you could set a static limit for arch where there's no way to check how much stack space is left? Or is it dynamically allocated at random sizes on those platforms?
Is it unreasonable to keep track of this sort of thing some place other than the stack? (I seem to recall the word heap for this context or something similar to it.)