Stack size for each CPU mode?

How much data can I put on the default user stack in each CPU mode before it causes a stack overflow? I’m mostly wondering about the stack sizes for SP_abt / abort-mode and SP_irq / irq-mode but it would also be very useful to know all the others too (such as SP_sys, SP_fiq, etc). I’m asking about the stacks VEXos configures on user program entry (the ones placed nearby 0x370C660), not anything that a framework like PROS or VEXcode configures

My abort handler code (which uses SP_abt) was using like ~4kb of stack which was seemingly eating into the IRQ stack and causing memory corruption whenever there was an interrupt. I want to fix that code but I don’t know what my actual budget is here.

.stack          0x0371c090     0x5400
                0x0371c090                . = ALIGN (0x10)
                0x0371c090                _stack_end = .
                0x0371e090                . = (. + _STACK_SIZE)
 *fill*         0x0371c090     0x2000 
                0x0371e090                _stack = .
                0x0371e090                __stack = _stack
                0x0371e090                . = ALIGN (0x10)
                0x0371e090                _irq_stack_end = .
                0x03720090                . = (. + _STACK_SIZE)
 *fill*         0x0371e090     0x2000 
                0x03720090                __irq_stack = .
                0x03720090                _supervisor_stack_end = .
                0x03720890                . = (. + _SUPERVISOR_STACK_SIZE)
 *fill*         0x03720090      0x800 
                0x03720890                . = ALIGN (0x10)
                0x03720890                __supervisor_stack = .
                0x03720890                _abort_stack_end = .
                0x03720c90                . = (. + _ABORT_STACK_SIZE)
 *fill*         0x03720890      0x400 
                0x03720c90                . = ALIGN (0x10)
                0x03720c90                __abort_stack = .
                0x03720c90                _fiq_stack_end = .
                0x03721090                . = (. + _FIQ_STACK_SIZE)
 *fill*         0x03720c90      0x400 
                0x03721090                . = ALIGN (0x10)
                0x03721090                __fiq_stack = .
                0x03721090                _undef_stack_end = .
                0x03721490                . = (. + _UNDEF_STACK_SIZE)
 *fill*         0x03721090      0x400 
                0x03721490                . = ALIGN (0x10)
                0x03721490                __undef_stack = .
                0x03721490                _end = .

That’s from a more recent build of cpu1 side vexos (1.1.6 beta4). I could probably increase the sizes, it’s not something we have ever thought about in the last several years.

_ABORT_STACK_SIZE = DEFINED(_ABORT_STACK_SIZE) ? _ABORT_STACK_SIZE : 1024;
_SUPERVISOR_STACK_SIZE = DEFINED(_SUPERVISOR_STACK_SIZE) ? _SUPERVISOR_STACK_SIZE : 2048;
_FIQ_STACK_SIZE = DEFINED(_FIQ_STACK_SIZE) ? _FIQ_STACK_SIZE : 1024;
_UNDEF_STACK_SIZE = DEFINED(_UNDEF_STACK_SIZE) ? _UNDEF_STACK_SIZE : 1024;