@assafmo If the enclave passes the stack size limit, EALL will return SGX_ERROR_STACK_OVERRUN.
Enclave thread context memory layout: guard page | stack | guard page | TCS | SSA | guard page | TLS/TD When the stack is overallocated, the enclave will receive an exception, and the exception handler will check whether the rsp at the time of the exception is in the stack range. If the rsp is not in the stack boundary, set the enclave status to ENCLAVE_CRASHED, and ECALL will return with SGX_ERROR_STACK_OVERRUN. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/254#issuecomment-679948624