From: Julian Seward Date: Sat, 14 Jul 2018 13:39:59 +0000 (+0200) Subject: Add some initialisations that seemed to be required as a result of an LTO build with... X-Git-Tag: VALGRIND_3_14_0~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b7b6662f240c455c5c3e109cd5aaad936731987;p=thirdparty%2Fvalgrind.git Add some initialisations that seemed to be required as a result of an LTO build with a gcc 8 prerelease. --- diff --git a/coregrind/m_coredump/coredump-elf.c b/coregrind/m_coredump/coredump-elf.c index 98cf921b15..647338ace9 100644 --- a/coregrind/m_coredump/coredump-elf.c +++ b/coregrind/m_coredump/coredump-elf.c @@ -542,9 +542,12 @@ void dump_one_thread(struct note **notelist, const vki_siginfo_t *si, ThreadId t { vki_elf_fpregset_t fpu; struct vki_elf_prstatus prstatus; + VG_(memset)(&fpu, 0, sizeof(fpu)); + VG_(memset)(&prstatus, 0, sizeof(prstatus)); # if defined(VGP_x86_linux) && !defined(VGPV_x86_linux_android) { vki_elf_fpxregset_t xfpu; + VG_(memset)(&xfpu, 0, sizeof(xfpu)); fill_xfpu(&VG_(threads)[tid], &xfpu); add_note(notelist, "LINUX", NT_PRXFPREG, &xfpu, sizeof(xfpu)); } diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c index 57a97a4796..660e696096 100644 --- a/coregrind/m_redir.c +++ b/coregrind/m_redir.c @@ -1185,8 +1185,10 @@ void VG_(redir_notify_delete_DebugInfo)( const DebugInfo* delsi ) Addr VG_(redir_do_lookup) ( Addr orig, Bool* isWrap ) { Active* r = VG_(OSetGen_Lookup)(activeSet, &orig); - if (r == NULL) + if (r == NULL) { + if (isWrap) *isWrap = False; return orig; + } vg_assert(r->to_addr != 0); if (isWrap) diff --git a/drd/drd_error.c b/drd/drd_error.c index b9e62f1309..622b344b16 100644 --- a/drd/drd_error.c +++ b/drd/drd_error.c @@ -159,7 +159,10 @@ void drd_report_data_race(const Error* const err, const HChar* const auxwhat_prefix = xml ? " " : ""; const HChar* const auxwhat_suffix = xml ? "" : ""; const HChar* const indent = xml ? " " : ""; + AddrInfo ai; + VG_(memset)(&ai, 0, sizeof(ai)); + ai.akind = eUnknown; // A safe initial value (?) DiEpoch cur_ep = VG_(current_DiEpoch)(); XArray* /* of HChar */ descr1