Closed
Description
|Board|ESP32 Dev Module||
|Version/Date|framework-arduinoespressif32 3.10006.210326 (1.0.6)|
|IDE name|VSCode + Platform.io|
|Flash Frequency|80Mhz|
|PSRAM enabled|yes|
|Upload Speed|115200|
|Computer OS|Windows 10|
Description:
log_printf() function has race when it will be used from separate task.
Sketch:
int log_printf(const char *format, ...)
{
if(s_uart_debug_nr < 0){
return 0;
}
**static** char loc_buf[64];
char * temp = loc_buf;
int len;
....
The issue is in static keyword. so lock_buf will be shared between all tasks.
And when you will do log_e() or something els with short message, it is possible race when other task will use the same buffer.