memleak: add backtrace to allocations.

We use the tal notifiers to attach a `backtrace` object on every
allocation.

This also means moving backtrace_state from log.c into lightningd.c, so
we can hand it to memleak_init().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-12-15 20:48:54 +10:30
committed by Christian Decker
parent c956d9f5eb
commit dfc132b2fe
8 changed files with 111 additions and 20 deletions

View File

@@ -95,7 +95,4 @@ const tal_t *ltmp;
/* Before the crashlog is activated, just prints to stderr. */
void NORETURN PRINTF_FMT(1,2) fatal(const char *fmt, ...);
#if DEVELOPER
extern bool dev_no_backtrace;
#endif
#endif /* LIGHTNING_LIGHTNINGD_LOG_H */