Stack overflow when masked should still throw at interruptible operations or inner unmask
|Reported by:||ezyang||Owned by:||simonmar|
|Type of failure:||Incorrect result at runtime||Difficulty:||Easy (less than 1 hour)|
|Test Case:||Blocked By:|
Currently, to deal with #767, stack overflow exceptions are never emitted when exceptions are masked; e.g. if the thread unmasks and it is back under the stack limit, it will be as if the thread never stack-overflowed. However, it seems that we can be a bit more proactive about throwing the exception, in a way similar to asynchronous exceptions, wherein we add the stack overflow to the blocked exceptions list and let it be thrown at an interruptible point or if the exceptions get unmasked.
Patch would be pretty simple, I'd like to check if people think this is a better idea.