[ARM] Fix poison memory functions.

We were poisoning 4x more data and overrunning our buffers. We don't want to do this.
This commit is contained in:
Ryan Houdek 2015-02-12 18:45:06 -06:00
parent 20dae1f210
commit 8074d06270
2 changed files with 2 additions and 2 deletions

View File

@ -756,7 +756,7 @@ private:
void PoisonMemory() override void PoisonMemory() override
{ {
u32* ptr = (u32*)region; u32* ptr = (u32*)region;
u32* maxptr = (u32*)region + region_size; u32* maxptr = (u32*)(region + region_size);
// If our memory isn't a multiple of u32 then this won't write the last remaining bytes with anything // If our memory isn't a multiple of u32 then this won't write the last remaining bytes with anything
// Less than optimal, but there would be nothing we could do but throw a runtime warning anyway. // Less than optimal, but there would be nothing we could do but throw a runtime warning anyway.
// AArch64: 0xD4200000 = BRK 0 // AArch64: 0xD4200000 = BRK 0

View File

@ -689,7 +689,7 @@ private:
void PoisonMemory() override void PoisonMemory() override
{ {
u32* ptr = (u32*)region; u32* ptr = (u32*)region;
u32* maxptr = (u32*)region + region_size; u32* maxptr = (u32*)(region + region_size);
// If our memory isn't a multiple of u32 then this won't write the last remaining bytes with anything // If our memory isn't a multiple of u32 then this won't write the last remaining bytes with anything
// Less than optimal, but there would be nothing we could do but throw a runtime warning anyway. // Less than optimal, but there would be nothing we could do but throw a runtime warning anyway.
// ARM: 0x01200070 = BKPT 0 // ARM: 0x01200070 = BKPT 0