[riot-notifications] [RIOT] Fix write of thread stack end test marker (#3199)

ximus 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:

  https://github.com/RIOT-OS/RIOT/pull/3199

-- Commit Summary --

  * Fix write of thread stack end marker

-- File Changes --

    M core/thread.c (2)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/3199.patch
https://github.com/RIOT-OS/RIOT/pull/3199.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3199
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150612/c0bb9409/attachment.html>


More information about the notifications mailing list