Is there a programmatic way to check stack corruption

后端 未结 8 1015
北海茫月
北海茫月 2021-02-08 21:29

I am working with a multithreaded embedded application. Each thread is allocated stack sizes based on its functionality. Recently we found that one of the thread corrupted the s

8条回答
  •  一整个雨季
    2021-02-08 21:59

    Ideally valgrind would support your platform/OS. It's shocking to me that you don't get a separate vm memory region for each thread's stack. If there's any way to build your app so it can run on linux as well, you can probably reproduce the bug there and catch it with valgrind.

提交回复
热议问题