teknoraver / rpms / rpm

Forked from rpms/rpm 3 months ago
Clone

Blame SOURCES/0003-debugedit-Make-sure-.debug_line-old-new-idx-start-eq.patch

f6faf3
From 00a0afd5e079a73ef6871f1538f34fa4e67892e6 Mon Sep 17 00:00:00 2001
f6faf3
Message-Id: <00a0afd5e079a73ef6871f1538f34fa4e67892e6.1573552234.git.pmatilai@redhat.com>
f6faf3
In-Reply-To: <ce6e8556a8f93327d6de0446f21ac5e549861d82.1573552234.git.pmatilai@redhat.com>
f6faf3
References: <ce6e8556a8f93327d6de0446f21ac5e549861d82.1573552234.git.pmatilai@redhat.com>
f6faf3
From: Mark Wielaard <mark@klomp.org>
f6faf3
Date: Mon, 17 Jun 2019 11:23:26 +0200
f6faf3
Subject: [PATCH 3/3] debugedit: Make sure .debug_line old/new idx start equal.
f6faf3
f6faf3
Found by running the debugedit tests under valgrind.
f6faf3
If the old and new .debug_line offset isn't changed then we might
f6faf3
write out an uninitialized new_idx.
f6faf3
---
f6faf3
 tools/debugedit.c | 1 +
f6faf3
 1 file changed, 1 insertion(+)
f6faf3
f6faf3
diff --git a/tools/debugedit.c b/tools/debugedit.c
f6faf3
index 84483ef5e..9f8dcd0fb 100644
f6faf3
--- a/tools/debugedit.c
f6faf3
+++ b/tools/debugedit.c
f6faf3
@@ -1177,6 +1177,7 @@ get_line_table (DSO *dso, size_t off, struct line_table **table)
f6faf3
   *table = NULL;
f6faf3
 
f6faf3
   t->old_idx = off;
f6faf3
+  t->new_idx = off;
f6faf3
   t->size_diff = 0;
f6faf3
   t->replace_dirs = false;
f6faf3
   t->replace_files = false;
f6faf3
-- 
f6faf3
2.23.0
f6faf3