diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-10-08 23:51:31 +0200 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-10-08 23:51:31 +0200 |
commit | 1d67c0c87a56349f7a0169e6bef6385696d86af2 (patch) | |
tree | bd9c89e490cb7f7d06965e185aab913e3efb0ea9 /libdw/cfi.c | |
parent | 07f3507442cb3f913000844025ca139925afe110 (diff) | |
download | elfutils-1d67c0c87a56349f7a0169e6bef6385696d86af2.tar.gz |
lib/
system.h (eu_static_assert): New macro.
libdw/
cfi.c: New include system.h.
(execute_cfi) (enough_registers): Clear new memory after realloc.
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Diffstat (limited to 'libdw/cfi.c')
-rw-r--r-- | libdw/cfi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libdw/cfi.c b/libdw/cfi.c index f59f17d6..b1e8d485 100644 --- a/libdw/cfi.c +++ b/libdw/cfi.c @@ -35,6 +35,7 @@ #include "cfi.h" #include "memory-access.h" #include "encoded-value.h" +#include "system.h" #include <assert.h> #include <stdlib.h> #include <string.h> @@ -89,6 +90,9 @@ execute_cfi (Dwarf_CFI *cache, } else { + eu_static_assert (reg_unspecified == 0); + memset (bigger->regs + bigger->nregs, 0, + (reg + 1 - bigger->nregs) * sizeof bigger->regs[0]); bigger->nregs = reg + 1; fs = bigger; } |