am 8e0e372a: Set PROT_EXEC on the whole pixelflinger code cache.

Merge commit '8e0e372a388434a0553810e2b958e59a26a6bd96' into gingerbread-plus-aosp

* commit '8e0e372a388434a0553810e2b958e59a26a6bd96':
  Set PROT_EXEC on the whole pixelflinger code cache.
This commit is contained in:
Jean-Baptiste Queru 2010-10-15 06:08:04 -07:00 committed by Android Git Automerger
commit 287a9585dc

View file

@ -94,7 +94,7 @@ void Assembly::ensureMbaseExecutable()
long pagemask = ~(pagesize - 1); // assumes pagesize is a power of 2
uint32_t* pageStart = (uint32_t*) (((uintptr_t) mBase) & pagemask);
size_t adjustedLength = mBase - pageStart + mSize;
size_t adjustedLength = (mBase - pageStart) * sizeof(uint32_t) + mSize;
if (mBase && mprotect(pageStart, adjustedLength, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) {
mspace_free(getMspace(), mBase);