[En-Nut-Discussion] Race condition and stack overflow in tcpsm.c
Ole Reinhardt
ole.reinhardt at embedded-it.de
Thu Nov 20 22:24:56 CET 2014
Hi Philipp, Hi Harald,
>> With these changes, I still managed to crash the system after some time,
>> but it looks like a different problem this time, as all stacks should
>> still be intact.
>
> In the first place you need to find out, where it crashes, then why it
> does. Yeah, I know, simply said but difficult to do. With ARM7 I was
> quite successful with stack back-tracing. I do not have much experience
> with Cortex, though.
For cortex, I implemented a heuristic stack backtrace mechanism, which
analyses the code to print a backtrace.
The main problem on Cortex M3/M4 is, that no frame pointer exists, which
points to the start of the previous stack frame. A real backtrace
algorithm would need to read the debugging symbols of the elf file.
However the backtrace works in most cases, if optimisation is set to -O0
and if DEBUG_MACRO and DEBUG_BACKTRACE are selected in the configurator.
Best regards,
Ole
--
kernel concepts GmbH Tel: +49-271-771091-14
Sieghuetter Hauptweg 48 Mob: +49-177-7420433
D-57072 Siegen
http://www.embedded-it.de
http://www.kernelconcepts.de
More information about the En-Nut-Discussion
mailing list