Does FreeRTOS support thread sanitizing?

Does FreeRTOS support thread sanitizing? On all arch? Some arch? No arch?

If no, is this planned?

If yes, what would be the milestones and steps to go through to get there?

Franck

Are you referring to the thread sanitizer like gcc has? If that’s what you mean, then you should know that the gcc thread sanitizer relies on a bunch of OS features (posix signals and such) in order to operate. Those things are not available on FreeRTOS.

What I have done in the past, is that if I am creating a primitive that I intend to use with FreeRTOS (for example a custom queue) I will implement it using portable code then unit test and sanitize it on linux first. Then you are trusting that your portable code is also validated on target as well. Its not perfect but works well enough in my experience.

1 Like

I am considering the GCC POSIX port running on x86 / linux. I’d like to know if it is possible to use and run this port with sanitizers (thread, address, …). My understanding is that pxCurrentTCB[s] will trigger false positive with tsan. Is this correct? How to avoid this? Are there other problems or known issues or other sources of false positives to expect?

I need to run my FreeRTOS application based on GCC POSIX port with sanitizers.