Chasing across them obviously defeats the redirect mechanism, with
bad effects for Memcheck, Helgrind, DRD, Massif, and possibly others.
*/
-static Bool chase_into_ok ( void* closureV, Addr64 addr64 )
+static Bool chase_into_ok ( void* closureV, Addr addr )
{
- Addr addr = (Addr)addr64;
NSegment const* seg = VG_(am_find_nsegment)(addr);
/* Work through a list of possibilities why we might not want to
goto dontchase;
# if defined(VG_PLAT_USES_PPCTOC) || defined(VGP_ppc64le_linux)
- /* This needs to be at the start of its own block. Don't chase. Re
- ULong_to_Ptr, be careful to ensure we only compare 32 bits on a
- 32-bit target.*/
- if (ULong_to_Ptr(addr64)
- == (void*)&VG_(ppctoc_magic_redirect_return_stub))
+ /* This needs to be at the start of its own block. Don't chase. */
+ if (addr == (Addr)&VG_(ppctoc_magic_redirect_return_stub))
goto dontchase;
# endif
Chasing into EX increases the number of EX translations from 21 to
102666 causing a 7x runtime increase for "none" and a 3.2x runtime
increase for memcheck. */
- if (((UChar *)ULong_to_Ptr(addr))[0] == 0x44 || /* EX */
- ((UChar *)ULong_to_Ptr(addr))[0] == 0xC6) /* EXRL */
- goto dontchase;
+ if (((UChar *)addr)[0] == 0x44 || /* EX */
+ ((UChar *)addr)[0] == 0xC6) /* EXRL */
+ goto dontchase;
# endif
/* well, ok then. go on and chase. */
------------------------------------------------------------------ */
// VEX defines Char, UChar, Short, UShort, Int, UInt, Long, ULong, SizeT,
-// Addr32, Addr64, HWord, HChar, Bool, False and True.
+// Addr, Addr32, Addr64, HWord, HChar, Bool, False and True.
#include "libvex_basictypes.h"
// For varargs types
typedef unsigned long UWord; // 32 64
typedef signed long Word; // 32 64
-// Addr is for holding an address.
-typedef UWord Addr; // 32 64
-
// Our equivalent of POSIX 'ssize_t':
// - ssize_t is "used for a count of bytes or an error indication".
typedef Word SSizeT; // 32 64