|
From: <sv...@va...> - 2006-03-12 00:39:22
|
Author: sewardj
Date: 2006-03-12 00:39:19 +0000 (Sun, 12 Mar 2006)
New Revision: 5750
Log:
Fix a redirection bug created by the overhaul of m_redir.c. Bug
caused hardwired Actives to be discarded at the first call to
VG_(redir_notify_delete_SegInfo). This causes crashes on amd64-linux
by throwing away the hardwired redirections
0xFFFFFFFFFF600000 -> VG_(amd64_linux_REDIR_FOR_vgettimeofday)
0xFFFFFFFFFF600400 -> VG_(amd64_linux_REDIR_FOR_vtime)
which I'm sure got mentioned at some point recently, but I cannot find
the email now.
Bug does not affect 3.1.X, since that line contains the old m_redir.c
implementation.
Bug does not affect any platform other than amd64-linux since no
others have hardwired Actives at the start.
Modified:
trunk/coregrind/m_redir.c
Modified: trunk/coregrind/m_redir.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_redir.c 2006-03-12 00:35:42 UTC (rev 5749)
+++ trunk/coregrind/m_redir.c 2006-03-12 00:39:19 UTC (rev 5750)
@@ -573,11 +573,16 @@
&& (act->parent_spec->mark || act->parent_sym->mark);
=20
/* While we're at it, a bit of paranoia: delete any actives
- which don't have both feet in valid client executable
- areas. */
- if (!delMe) {
- if (!is_plausible_guest_addr(act->from_addr)) delMe =3D True;
- if (!is_plausible_guest_addr(act->to_addr)) delMe =3D True;
+ which don't have both feet in valid client executable areas.
+ But don't delete hardwired-at-startup ones; these are denoted
+ by having parent_spec or parent_sym being NULL. */
+ if ( (!delMe)
+ && act->parent_spec !=3D NULL
+ && act->parent_sym !=3D NULL ) {
+ if (!is_plausible_guest_addr(act->from_addr))
+ delMe =3D True;
+ if (!is_plausible_guest_addr(act->to_addr))
+ delMe =3D True;
}
=20
if (delMe) {
|