]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add some initialisations that seemed to be required as a result of an LTO build with...
authorJulian Seward <jseward@acm.org>
Sat, 14 Jul 2018 13:39:59 +0000 (15:39 +0200)
committerJulian Seward <jseward@acm.org>
Sat, 14 Jul 2018 13:39:59 +0000 (15:39 +0200)
coregrind/m_coredump/coredump-elf.c
coregrind/m_redir.c
drd/drd_error.c

index 98cf921b15691ceeb8316d2abe876f822749fb3c..647338ace96c71da67e9618a2cd6d43ea141fb13 100644 (file)
@@ -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));
       }
index 57a97a4796f49a392b5e9c0307331192d1dc19d7..660e696096e7aa74fde6f5386790bf76c96c68ec 100644 (file)
@@ -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)
index b9e62f1309e4b8e3e10217e68a769a84aae98ea3..622b344b16aaed141053d4a94be99e53478806c5 100644 (file)
@@ -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