[riot-notifications] [RIOT] Fix write of thread stack end test marker (#3199)
notifications at github.com
Sat Jun 13 01:33:09 CEST 2015
Reproducible with any thread without the `CREATE_STACKTEST` thread creation flag, and `DEVELHELP` and `SCHED_TEST_STACK` environment variables enabled.
Under these conditions, I was noticing UART output such as `scheduler(): stack overflow detected, pid=4` for some threads.
Using GDB, I found that these threads *were not overflowing* their thread stack buffers.
I noticed that only the lower half of the marker was being written to the end of the stack while the stack overflow test condition is testing for the entire marker. This is because `stack` is a `char` pointer but the value being written is a `uintptr_t`.
This patch removed the problem
My cpu is an msp430
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* Fix write of thread stack end marker
-- File Changes --
M core/thread.c (2)
-- Patch Links --
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications