mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
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:
committed by
Christian Decker
parent
c956d9f5eb
commit
dfc132b2fe
@@ -48,7 +48,7 @@ void log_(struct log *log UNNEEDED, enum log_level level UNNEEDED, const char *f
|
||||
void memleak_cleanup(void)
|
||||
{ fprintf(stderr, "memleak_cleanup called!\n"); abort(); }
|
||||
/* Generated stub for memleak_init */
|
||||
void memleak_init(const tal_t *root UNNEEDED)
|
||||
void memleak_init(const tal_t *root UNNEEDED, struct backtrace_state *bstate UNNEEDED)
|
||||
{ fprintf(stderr, "memleak_init called!\n"); abort(); }
|
||||
/* Generated stub for new_log */
|
||||
struct log *new_log(const tal_t *ctx UNNEEDED, struct log_book *record UNNEEDED, const char *fmt UNNEEDED, ...)
|
||||
|
||||
Reference in New Issue
Block a user