Re: Stack check failure with qemu_x86

Vakul Garg <vakul.garg@...>

The stack check failure shows up with only stack sentinel enabled on qemu_x86 in my case.

- Vakul

From: Boie, Andrew P <andrew.p.boie@...>
Sent: Monday, December 11, 2017 10:37:38 PM
To: Vakul Garg; zephyr-users@...
Subject: RE: Stack check failure with qemu_x86

There's no need to enable the stack sentinel on this target.

qemu_x86, by default, has MMU-assisted stack overflow protection enabled.

Unless you can reproduce this only when the sentinel is enabled? In which case this is a very interesting situation, please let me know.


In GDB you can set a breakpoint on _SysFatalErrorHandler() to debug when issues happen, all fatal exceptions go through there.




From: zephyr-users-bounces@... [mailto:zephyr-users-bounces@...] On Behalf Of Vakul Garg
Sent: Wednesday, December 6, 2017 11:39 PM
To: zephyr-users@...
Subject: [Zephyr-users] Stack check failure with qemu_x86




I am running IPSP sample app using qemu_86 (on master branch).

I have enabled following to detect stack corruption.






This results in stack check error.

I tried attaching gdb, but the qemu itself terminates resulting on closure of debug connection


Can someone give me pointers how to debug the same?


***** Stack Check Fail! *****

Current thread ID = 0x004035a0

Faulting segment:address = 0x0008:0x00003f6f

eax: 0x5be0cd19, ebx: 0xa54ff53a, ecx: 0x6a09e667, edx: 0x3c6ef372

esi: 0x1f83d9ab, edi: 0x510e527f, ebp: 0x9b05688c, esp: 0x0041dff8

eflags: 0x202

Terminate emulator due to fatal kernel error







Join to automatically receive all group messages.