]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
PE/PDB handling: allow the PDB (the debuginfo file) to be up to 1
authorJulian Seward <jseward@acm.org>
Fri, 29 Jan 2010 22:37:02 +0000 (22:37 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 29 Jan 2010 22:37:02 +0000 (22:37 +0000)
minute older than the PE (the .exe/.dll it describes) even though this
doesn't seem particularly safe.  Partially fixes #190675.
(patch from Dan Kegel)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11033

coregrind/m_debuginfo/debuginfo.c

index bf8c5676ee84a5d4880163960f4e17c94876c7e2..ac582d28f3eec5aedea64e708afa3d34f43b3212 100644 (file)
@@ -971,9 +971,15 @@ void VG_(di_notify_pdb_debuginfo)( Int fd_obj, Addr avma_obj,
       goto out;
    }
    pdb_mtime = stat_buf.mtime;
-   if (pdb_mtime < obj_mtime ) {
-      /* PDB file is older than PE file - ignore it or we will either
-         (a) print wrong stack traces or more likely (b) crash. */
+
+   if (obj_mtime - pdb_mtime > 60ULL) {
+      /* PDB file is older than PE file.  Really, the PDB should be
+         newer than the PE, but that doesn't always seem to be the
+         case.  Allow the PDB to be up to one minute older.
+         Otherwise, it's probably out of date, in which case ignore it
+         or we will either (a) print wrong stack traces or more likely
+         (b) crash.
+      */
       VG_(message)(Vg_UserMsg,
                    "Warning: Ignoring %s since it is older than %s\n",
                    pdbname, exename);