diff --git a/src/gallium/auxiliary/util/u_debug_stack.c b/src/gallium/auxiliary/util/u_debug_stack.c index 7013807b6b2..6ddacdb362f 100644 --- a/src/gallium/auxiliary/util/u_debug_stack.c +++ b/src/gallium/auxiliary/util/u_debug_stack.c @@ -90,8 +90,8 @@ symbol_name_cached(unw_cursor_t *cursor, unw_proc_info_t *pip) procname[1] = 0; } - asprintf(&name, "%s%s", procname, ret == -UNW_ENOMEM ? "..." : ""); - + if (asprintf(&name, "%s%s", procname, ret == -UNW_ENOMEM ? "..." : "") == -1) + name = "??"; util_hash_table_set(symbols_hash, addr, (void*)name); } mtx_unlock(&symbols_mutex);