forked from espressif/esp-idf
esp_system: fix placement of __stack_chk_fail from flash to RAM
When stack check is enabled, certain functions (sometimes placed in RAM) are being decorated with stack guards and a call to __stask_chk_fail() in case ofr stack corruption. For this reason, __stack_chk_fail() must be placed in RAM too. Add stack check config in heap tests on all targets to find eventual flash to RAM calls due to stack checks when running callgraph_check.py
This commit is contained in:
@ -31,10 +31,9 @@ __esp_stack_guard_setup (void)
|
|||||||
__stack_chk_guard = (void *)esp_random();
|
__stack_chk_guard = (void *)esp_random();
|
||||||
}
|
}
|
||||||
|
|
||||||
void __stack_chk_fail (void)
|
IRAM_ATTR void __stack_chk_fail (void)
|
||||||
{
|
{
|
||||||
esp_rom_printf("\r\nStack smashing protect failure!\r\n\r\n");
|
esp_system_abort(DRAM_STR("Stack smashing protect failure!"));
|
||||||
abort();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -111,7 +111,7 @@ class Reference(object):
|
|||||||
|
|
||||||
|
|
||||||
class IgnorePair():
|
class IgnorePair():
|
||||||
def __init__(self, pair) -> None: # type: (str)
|
def __init__(self, pair): # type: (str) -> None
|
||||||
self.symbol, self.function_call = pair.split('/')
|
self.symbol, self.function_call = pair.split('/')
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user