You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm using blackmagic 1.10.2 to flash devices and found a memory leak. My investigation showed that the problem is within adiv5_swd_scan.
Blackmagic code is running on Nrf52840 and the Swd target is also Nrf52840.
The important condition for bug reproducing is exception during swd scan. There is some noise environment, so this can happen sometimes. To simulate this situation, you can add code that emulates errors when reading Swd, for example:
As you can see, the size of free memory did not change during a successful scan and leaked with each error. Always 60 + 36 bytes or just 60 bytes(these numbers are from tracing all allocations).
Also, I found, that adiv5_debug_port_s *dp = calloc(1, sizeof(*dp)); has refcount 1 at the end of failed iterations.
Hope, it can helps. I am ready for any test to resolve this issue.
The text was updated successfully, but these errors were encountered:
Hello,
I'm using blackmagic 1.10.2 to flash devices and found a memory leak. My investigation showed that the problem is within adiv5_swd_scan.
Blackmagic code is running on Nrf52840 and the Swd target is also Nrf52840.
The important condition for bug reproducing is exception during swd scan. There is some noise environment, so this can happen sometimes. To simulate this situation, you can add code that emulates errors when reading Swd, for example:
Here is my test code:
Here is an example of output:
As you can see, the size of free memory did not change during a successful scan and leaked with each error. Always 60 + 36 bytes or just 60 bytes(these numbers are from tracing all allocations).
Also, I found, that
adiv5_debug_port_s *dp = calloc(1, sizeof(*dp));
has refcount 1 at the end of failed iterations.Hope, it can helps. I am ready for any test to resolve this issue.
The text was updated successfully, but these errors were encountered: