From cb9868e82de797c757d00b6e8add98ef25b0a44c Mon Sep 17 00:00:00 2001 From: Guillaume Souchere Date: Tue, 3 Oct 2023 09:49:25 +0200 Subject: [PATCH] feat(heap): Add runtime hint on tlsf assert trigger Catch all tlsf assertion failure and display a hint for out of bound writing since all assertion failure are triggered when the tlsf metadata structure has been corrupted. --- tools/idf_py_actions/hints.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/idf_py_actions/hints.yml b/tools/idf_py_actions/hints.yml index 1a9c722f88..cf24e8ff9b 100644 --- a/tools/idf_py_actions/hints.yml +++ b/tools/idf_py_actions/hints.yml @@ -388,3 +388,7 @@ - re: "intr_alloc: No free interrupt inputs for [_\\w]+ interrupt" hint: "For troubleshooting instructions related to interrupt allocation, run 'idf.py docs -sp api-reference/system/intr_alloc.html'" + +- + re: "assert failed: [\\w]+ tlsf.c:[\\d]+" + hint: "CORRUPT HEAP: heap metadata corrupted resulting in TLSF malfunction.\nMake sure you are not making out of bound writing on the memory you allocate in your application.\nMake sure you are not writing on freed memory.\nFor more information run 'idf.py docs -sp api-reference/system/heap_debug.html'."