I found memory corruption in my embedded environment (my program runs on a console with its own OS). but I could not get the root cause of this. memory corruption itself is detected after a stress test of launching and exiting the application several times. that I could not set a memory breakpoint because the damaged variable changes the address every time the application starts, is there any idea to catch the root cause of this corruption?
(A memory breakpoint is a breakpoint that is triggered when the environment changes the address value of the receiving memory)
Please also note that all my software is developed using C.
Thank you for your help.
These are always complex problems in embedded systems, and there is no easy answer. Some tips:
Good luck
Yes, these problems can be difficult to debug with a debugger.
A few ideas:
#if 0
?
, . , , , . , , , , , , , , .
, , , . , , , , . , - .
, .
, , , , , .
, , . , , . .
, , ISR. , . , , ISR .
, , .. , , - . , , , .
, RTOS. . , .
, , , - .
, , " ". , . , . , " " . , , , , .
, , ( - , ?). , , , , , . , . , , (, , ).
, -, , , . - .
, , . , , , , ( , ).
. ? , ?
, , . , .
, , , , , , , .
Printfs malloc/realloc/free proxy Electric Fence , , .
, ElectricFence, dmalloc .. - , - (, , ( ) ) .. - dmalloc.
. , , - ( , ), , (, guardmalloc, ).
The C library that you use may include some routines for detecting heap corruption (e.g. glibc). Turn them on along with any trace features you have, so you can see what happens when the heap has been corrupted.
Source: https://habr.com/ru/post/1722045/More articles:Will there be data in the queue for pipes to read Perl? - ioProgress LZMA SDK - c ++Как упаковать пользовательский шрифт TrueType с веб-сайта, чтобы браузеры его отображали? - cssWhat is this syntax? - cIntegration between Rails ActiveRecord and Java Hibernate - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1722046/how-do-you-configure-jboss-to-trim-additional-whitespaces-generated-by-jsps&usg=ALkJrhiqntV6CHFRtp9FysGFipLQabqV9wОбработка событий времени разработки Visual Studio - visual-studiohttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1722048/how-do-i-access-to-an-address-in-memory-with-c&usg=ALkJrhhAtu1akKZrkvc04RNbtoD_UuCUsQHow to access parent document properties for children to use - xmlIs BASH multi-threaded programming a generic method? - multithreadingAll Articles