mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] tlsf: dump stack on assertion failure
@ 2022-01-08 17:14 Ahmad Fatoum
  2022-01-08 17:14 ` [PATCH 2/3] driver: have CONFIG_DEBUG_PROBES report device unbind as well Ahmad Fatoum
  2022-01-08 17:14 ` [PATCH 3/3] commands: add new devunbind debugging command Ahmad Fatoum
  0 siblings, 2 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2022-01-08 17:14 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

We only support AddressSanitizer on ARM, ARM64 and sandbox. For other
platforms TLSF assertions may detect some nconsistency, like some double
frees. Make the reports more useful by dumping stack in that case.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/tlsf.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/tlsf.h b/include/tlsf.h
index 7015de0eb525..161176d5ac84 100644
--- a/include/tlsf.h
+++ b/include/tlsf.h
@@ -42,9 +42,12 @@
 extern "C" {
 #endif
 
+#include <printk.h>
+
 #define tlsf_assert(expr) do {                              \
         if (unlikely(!(expr))) {                            \
                 printf(#expr "%s %d\n", __FILE__, __LINE__); \
+                dump_stack();                               \
         }                                                   \
 } while (0)
 
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-13 16:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-08 17:14 [PATCH 1/3] tlsf: dump stack on assertion failure Ahmad Fatoum
2022-01-08 17:14 ` [PATCH 2/3] driver: have CONFIG_DEBUG_PROBES report device unbind as well Ahmad Fatoum
2022-01-08 17:14 ` [PATCH 3/3] commands: add new devunbind debugging command Ahmad Fatoum
2022-01-10  8:56   ` Sascha Hauer
2022-01-13 16:04     ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox