]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: data_stack_grow event - Add backtrace_error field
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sun, 26 Mar 2023 20:48:20 +0000 (23:48 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 29 Mar 2023 10:08:13 +0000 (10:08 +0000)
This field is set if backtrace_get() failed.

src/lib/data-stack.c

index f7979bf28ececde12fac04b6d859df2f95dad925..237bb4fbdb99ef7021403aec3e13e25055e2faa0 100644 (file)
@@ -430,6 +430,8 @@ static void data_stack_send_grow_event(size_t last_alloc_size)
        const char *backtrace, *error;
        if (backtrace_get(&backtrace, &error) == 0)
                event_add_str(event_datastack, "backtrace", backtrace);
+       else
+               event_add_str(event_datastack, "backtrace_error", error);
 
        string_t *str = t_str_new(128);
        str_printfa(str, "total_used=%zu, total_alloc=%zu, last_alloc_size=%zu",