3 ms·
> non-segmented architectures don't have an architecturally defined way to know the stack base ARMv8-M does have stack limit registers, which do precisely this
by ctz 5y ago
> non-segmented architectures don't have an architecturally defined way to know the stack base
ARMv8-M does have stack limit registers, which do precisely this. Being a much simpler mechanism than the MPU, they are quicker to switch than the entire MPU state when switching tasks.
- bcantrill 5y agoYes, true -- it's more accurate to say "architectures traditionally don't have a way to know the stack base." Certainly, having an architecturally-defined way to know the base of the stack is/would be really really helpful, and would allow stack overflow to be at once less dangerous and much more debuggable!