From: Julian Seward Date: Fri, 29 Jan 2010 22:37:02 +0000 (+0000) Subject: PE/PDB handling: allow the PDB (the debuginfo file) to be up to 1 X-Git-Tag: svn/VALGRIND_3_6_0~391 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=69944232f8aafd8ac5076e9fe929aa6277b70c48;p=thirdparty%2Fvalgrind.git PE/PDB handling: allow the PDB (the debuginfo file) to be up to 1 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 --- diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index bf8c5676ee..ac582d28f3 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -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);