Blame SOURCES/0039-unwind-libdw-fix-initialization-of-libdwfl-cache.patch

aa77e6
From 69b2c33a77fa687feb41fafdbe187013aa812384 Mon Sep 17 00:00:00 2001
aa77e6
From: "Dmitry V. Levin" <ldv@altlinux.org>
aa77e6
Date: Tue, 7 Jan 2020 18:54:55 +0000
aa77e6
Subject: [PATCH] unwind-libdw: fix initialization of libdwfl cache
aa77e6
aa77e6
This fixes stack trace printing for early syscalls that precede
aa77e6
the first syscall from memory mapping or execve families.
aa77e6
aa77e6
* unwind-libdw.c (tcb_init): Set struct ctx.last_proc_updating
aa77e6
to a value different from mapping_generation so that libdwfl cache
aa77e6
is properly initialized before the first use.
aa77e6
* NEWS: Mention this fix.
aa77e6
aa77e6
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1788636
aa77e6
---
aa77e6
Backport changes:
aa77e6
 - NEWS hunk has been dropped.
aa77e6
aa77e6
---
aa77e6
 NEWS           | 2 ++
aa77e6
 unwind-libdw.c | 2 +-
aa77e6
 2 files changed, 3 insertions(+), 1 deletion(-)
aa77e6
aa77e6
Index: strace-4.24/unwind-libdw.c
aa77e6
===================================================================
aa77e6
--- strace-4.24.orig/unwind-libdw.c	2020-01-23 12:55:01.922338273 +0100
aa77e6
+++ strace-4.24/unwind-libdw.c	2020-01-23 12:55:06.131299136 +0100
aa77e6
@@ -69,7 +69,7 @@
aa77e6
 
aa77e6
 	struct ctx *ctx = xmalloc(sizeof(*ctx));
aa77e6
 	ctx->dwfl = dwfl;
aa77e6
-	ctx->last_proc_updating = 0;
aa77e6
+	ctx->last_proc_updating = mapping_generation - 1;
aa77e6
 	return ctx;
aa77e6
 }
aa77e6