<div dir="ltr">What's the element written after the free? I set a watch at the exact block location, but it doesn't work:<div><br></div><div>Hardware watchpoint 7: *0x202ba8<br>(gdb) watch *0x206fec<br>Hardware watchpoint 8: *0x206fec<br>(gdb) c<br>Continuing.<br><br>Thread 1 hit Breakpoint 6, Init (argument=2107944) at /home/richi/quick-start/LatestStrong/src/rtems/c/src/../../testsuites/sptests/sp02/init.c:26<br>26    TEST_BEGIN();<br>(gdb) <br>Continuing.<br><br>Thread 1 hit Breakpoint 5, _Terminate (the_source=RTEMS_FATAL_SOURCE_HEAP, the_error=2125180) at /home/richi/quick-start/LatestStrong/src/rtems/c/src/../../cpukit/score/src/interr.c:38<br>38     _User_extensions_Fatal( the_source, the_error );<br>(gdb) <br>Continuing.<br><br>Thread 1 hit Breakpoint 4, bsp_reset () at /home/richi/quick-start/LatestStrong/src/rtems/c/src/lib/libbsp/arm/realview-pbx-a9/../../../../../../bsps/arm/realview-pbx-a9/start/bspreset.c:19<br>19     volatile uint32_t *sys_lock = (volatile uint32_t *) 0x10000020;<br>(gdb) <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 3, 2021 at 12:31 PM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 02/03/2021 05:44, Richi Dubey wrote:<br>
<br>
><br>
> (gdb) p *(Heap_Error_context*)(0x00206d7c)<br>
> $5 = {<br>
>   heap = 0x202ba8 <_Workspace_Area>,<br>
>   block = 0x206fec,<br>
>   reason = HEAP_ERROR_FREE_PATTERN<br>
> }<br>
<br>
If it is always the same address, then you can set a watch point to an <br>
element which is written after the free to catch the function which <br>
writes into this area.<br>
<br>
-- <br>
embedded brains GmbH<br>
Herr Sebastian HUBER<br>
Dornierstr. 4<br>
82178 Puchheim<br>
Germany<br>
email: <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
phone: +49-89-18 94 741 - 16<br>
fax:   +49-89-18 94 741 - 08<br>
<br>
Registergericht: Amtsgericht München<br>
Registernummer: HRB 157899<br>
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler<br>
Unsere Datenschutzerklärung finden Sie hier:<br>
<a href="https://embedded-brains.de/datenschutzerklaerung/" rel="noreferrer" target="_blank">https://embedded-brains.de/datenschutzerklaerung/</a><br>
<br>
</blockquote></div>