dcavalca / rpms / rpm

Forked from rpms/rpm a year ago
Clone

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

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