diff --git a/components/freertos/port/esp8266/port.c b/components/freertos/port/esp8266/port.c index c4469053..70e077c4 100644 --- a/components/freertos/port/esp8266/port.c +++ b/components/freertos/port/esp8266/port.c @@ -317,12 +317,9 @@ int xPortInIsrContext(void) void __attribute__((weak, noreturn)) vApplicationStackOverflowHook(xTaskHandle xTask, const char *pcTaskName) { - int *p = NULL; - ets_printf("***ERROR*** A stack overflow in task %s has been detected.\r\n", pcTaskName); - - /* cause a exception to jump into panic function */ - *p = 0; + + abort(); } signed portBASE_TYPE xTaskGenericCreate(TaskFunction_t pxTaskCode, diff --git a/components/newlib/newlib/port/syscall.c b/components/newlib/newlib/port/syscall.c index a7fe205d..e2ef5b6b 100644 --- a/components/newlib/newlib/port/syscall.c +++ b/components/newlib/newlib/port/syscall.c @@ -125,5 +125,9 @@ void _exit(int status) void abort(void) { ESP_LOGE("ABORT","Error found and abort!"); - while(1); + + /* cause a exception to jump into panic function */ + while (1) { + *((int *)NULL) = 0; + } } \ No newline at end of file