diff options
author | David Lechner <david@lechnology.com> | 2020-03-26 20:17:18 -0500 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-03-27 13:59:18 +1100 |
commit | 5e6cee07aba4fd73c13024f091a287171bea1f17 (patch) | |
tree | ff9bdff4b49ecd48de9281995d7f7e7646293ded /tests/micropython/heapalloc_fail_memoryview.py | |
parent | dbba6b05dc001d6e17328318e84243dfad592381 (diff) |
unix/mpthreadport: Fix crash when thread stack size <= 8k.
The stack size adjustment for detecting stack overflow in threads was not
taking into account that the requested stack size could be <= 8k, in which
case the subtraction would overflow. This is fixed in this commit by
ensuring that the adjustment can't be more than the available size.
This fixes the test tests/thread/thread_stacksize1.py which sometimes
crashes with a segmentation fault because of an uncaught NLR jump, which is
a "maximum recursion depth exceeded" exception.
Suggested-by: @dpgeorge
Diffstat (limited to 'tests/micropython/heapalloc_fail_memoryview.py')
0 files changed, 0 insertions, 0 deletions