mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
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. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5750
This commit is contained in:
parent
42ace2cacd
commit
0b7e01a2fa
@ -573,11 +573,16 @@ void VG_(redir_notify_delete_SegInfo)( SegInfo* delsi )
|
||||
&& (act->parent_spec->mark || act->parent_sym->mark);
|
||||
|
||||
/* 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 = True;
|
||||
if (!is_plausible_guest_addr(act->to_addr)) delMe = 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 != NULL
|
||||
&& act->parent_sym != NULL ) {
|
||||
if (!is_plausible_guest_addr(act->from_addr))
|
||||
delMe = True;
|
||||
if (!is_plausible_guest_addr(act->to_addr))
|
||||
delMe = True;
|
||||
}
|
||||
|
||||
if (delMe) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user