-/* $Id: RPoolMgr.h,v 1.3 2004/12/21 04:05:18 royce Exp $
+/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
if ( printzone )
{
- unsigned char* HiZone = Addr + pUsed->UserSize;
- unsigned char* LoZone = Addr - R_RZ; // this is to simplify indexing below...
+ unsigned char* HiZone = (unsigned char*)Addr + pUsed->UserSize;
+ unsigned char* LoZone = (unsigned char*)Addr - R_RZ; // this is to simplify indexing below...
R_DEBUG ( ", LoZone " );
for ( i = 0; i < R_RZ; i++ )
R_DEBUG ( "%02x", LoZone[i] );
RiPrintLastOwner ( pUsed );
R_DEBUG ( "\n" );
+ R_DEBUG ( "Contents of Block:\n" );
+ for ( i = 0; i < 8*16 && i < pUsed->UserSize; i += 16 )
+ {
+ int j;
+ R_DEBUG ( "%04X ", i );
+ for ( j = 0; j < 16; j++ )
+ {
+ if ( i+j < pUsed->UserSize )
+ {
+ R_DEBUG ( "%02X ", (unsigned)(unsigned char)Addr[i+j] );
+ }
+ else
+ {
+ R_DEBUG ( " " );
+ }
+ }
+ R_DEBUG(" ");
+ for ( j = 0; j < 16; j++ )
+ {
+ if ( i+j < pUsed->UserSize )
+ {
+ char c = Addr[i+j];
+ if ( c < 0x20 || c > 0x7E )
+ c = '.';
+ R_DEBUG ( "%c", c );
+ }
+ else
+ {
+ R_DEBUG ( " " );
+ }
+ }
+ R_DEBUG("\n");
+ }
R_PANIC();
}
static void
{
RiBadBlock ( pUsed, Addr, "invalid user size", file, line, 0 );
}
- HiZone = Addr + pUsed->UserSize;
- LoZone = Addr - R_RZ; // this is to simplify indexing below...
+ HiZone = (unsigned char*)Addr + pUsed->UserSize;
+ LoZone = (unsigned char*)Addr - R_RZ; // this is to simplify indexing below...
for ( i = 0; i < R_RZ && bLow && bHigh; i++ )
{
bLow = bLow && ( LoZone[i] == R_RZ_LOVALUE );
}
if ( !bLow || !bHigh )
{
- const char* violation = "High and Low-side redzone";
+ const char* violation = "High and Low-side redzone overwrite";
if ( bHigh ) // high is okay, so it was just low failed
- violation = "Low-side redzone";
+ violation = "Low-side redzone overwrite";
else if ( bLow ) // low side is okay, so it was just high failed
- violation = "High-side redzone";
+ violation = "High-side redzone overwrite";
RiBadBlock ( pUsed, Addr, violation, file, line, 1 );
}
}