mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 1/3] tlsf: dump stack on assertion failure
@ 2022-01-13 16:04 Ahmad Fatoum
  2022-01-13 16:04 ` [PATCH v2 2/3] driver: have CONFIG_DEBUG_PROBES report device unbind as well Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2022-01-13 16:04 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>
---
v1 -> v2: no change
---
 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] 4+ messages in thread

end of thread, other threads:[~2022-01-14  7:54 UTC | newest]

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

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