I haven't seen a stack overflow in years, so this must be an older program. If it occurs under emulation, like Virtual PC running DOS, you can increase the number of stacks allocated in CONFIG.SYS. The format of the parameter varies based on the version you're running.
STACKS in CONFIG.SYS only effects the stacks used by interrupts IIRC. Don't think it effects
an individual apps stack. It's been a long time though so I could be wrong:-)