Skip to content

Commit 6287650

Browse files
johnboilesIcarus113
authored andcommitted
fix(freertos): Use ESP_EARLY_LOGE in vPortTLSPointersDelCb for RISCV
Using ESP_LOG* in this function causes a crash
1 parent dc814f2 commit 6287650

File tree

2 files changed

+2
-2
lines changed
  • components/freertos
    • FreeRTOS-Kernel-SMP/portable/riscv
    • FreeRTOS-Kernel/portable/riscv

2 files changed

+2
-2
lines changed

components/freertos/FreeRTOS-Kernel-SMP/portable/riscv/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static void vPortTLSPointersDelCb( void *pxTCB )
252252
if ( pvThreadLocalStoragePointersDelCallback[ x ] != NULL ) { //If del cb is set
253253
/* In case the TLSP deletion callback has been overwritten by a TLS pointer, gracefully abort. */
254254
if ( !esp_ptr_executable( pvThreadLocalStoragePointersDelCallback[ x ] ) ) {
255-
ESP_LOGE("FreeRTOS", "Fatal error: TLSP deletion callback at index %d overwritten with non-excutable pointer %p", x, pvThreadLocalStoragePointersDelCallback[ x ]);
255+
ESP_EARLY_LOGE("FreeRTOS", "Fatal error: TLSP deletion callback at index %d overwritten with non-excutable pointer %p", x, pvThreadLocalStoragePointersDelCallback[ x ]);
256256
abort();
257257
}
258258

components/freertos/FreeRTOS-Kernel/portable/riscv/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ static void vPortTLSPointersDelCb( void *pxTCB )
714714
if ( pvThreadLocalStoragePointersDelCallback[ x ] != NULL ) { //If del cb is set
715715
/* In case the TLSP deletion callback has been overwritten by a TLS pointer, gracefully abort. */
716716
if ( !esp_ptr_executable( pvThreadLocalStoragePointersDelCallback[ x ] ) ) {
717-
ESP_LOGE("FreeRTOS", "Fatal error: TLSP deletion callback at index %d overwritten with non-excutable pointer %p", x, pvThreadLocalStoragePointersDelCallback[ x ]);
717+
ESP_EARLY_LOGE("FreeRTOS", "Fatal error: TLSP deletion callback at index %d overwritten with non-excutable pointer %p", x, pvThreadLocalStoragePointersDelCallback[ x ]);
718718
abort();
719719
}
720720

0 commit comments

Comments
 (0)