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

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