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

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