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

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