|
From: Julian S. <se...@so...> - 2018-07-14 13:41:15
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=5b7b6662f240c455c5c3e109cd5aaad936731987 commit 5b7b6662f240c455c5c3e109cd5aaad936731987 Author: Julian Seward <js...@ac...> Date: Sat Jul 14 15:39:59 2018 +0200 Add some initialisations that seemed to be required as a result of an LTO build with a gcc 8 prerelease. Diff: --- coregrind/m_coredump/coredump-elf.c | 3 +++ coregrind/m_redir.c | 4 +++- drd/drd_error.c | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/coregrind/m_coredump/coredump-elf.c b/coregrind/m_coredump/coredump-elf.c index 98cf921..647338a 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 57a97a4..660e696 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 b9e62f1..622b344 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 ? " <auxwhat>" : ""; const HChar* const auxwhat_suffix = xml ? "</auxwhat>" : ""; 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 |