1
Microcontrollers / Has anyone used ASAN & MSAN, and relevance to embedded arm32
« Last post by peter-h on Today at 01:57:22 pm »This came up on the MbedTLS mailing list, where somebody had some weird bug.
A suggestion was running the code with Asan
(https://github.com/google/sanitizers/wiki/AddressSanitizer) and Msan
(https://github.com/google/sanitizers/wiki/MemorySanitizer), both
natively available on Ubuntu.
But doesn't this require building the code for a "PC"?
In the case of MbedTLS one can indeed build a win32 version (and I do have that, done by the guy who did my MbedTLS implementation) although this was quite a lot of work, especially to use the same memory allocation strategy as the embedded target uses, which is quite important since you are processing external data (certificates of various sizes and with different hashes etc).
In my case I do not use the heap other than a one-off malloc for an optional feature which is never freed so fragmentation is impossible.
A suggestion was running the code with Asan
(https://github.com/google/sanitizers/wiki/AddressSanitizer) and Msan
(https://github.com/google/sanitizers/wiki/MemorySanitizer), both
natively available on Ubuntu.
But doesn't this require building the code for a "PC"?
In the case of MbedTLS one can indeed build a win32 version (and I do have that, done by the guy who did my MbedTLS implementation) although this was quite a lot of work, especially to use the same memory allocation strategy as the embedded target uses, which is quite important since you are processing external data (certificates of various sizes and with different hashes etc).
In my case I do not use the heap other than a one-off malloc for an optional feature which is never freed so fragmentation is impossible.