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

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