From 0db70fd628c8c396854e8473f80b265dd0abc01d Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Apr 23 2020 14:26:58 +0000 Subject: debugedit: Make sure .debug_line old/new idx start equal. Found by running the debugedit tests under valgrind. If the old and new .debug_line offset isn't changed then we might write out an uninitialized new_idx. --- diff --git a/tools/debugedit.c b/tools/debugedit.c index f6a3dba..4ec431f 100644 --- a/tools/debugedit.c +++ b/tools/debugedit.c @@ -1175,6 +1175,7 @@ get_line_table (DSO *dso, size_t off, struct line_table **table) *table = NULL; t->old_idx = off; + t->new_idx = off; t->size_diff = 0; t->replace_dirs = false; t->replace_files = false;