Remove page level mprotects

Freeing block mprotects on the page which it turn
may lead to application crash if linker subsequently
tries to modify another block on the page.

Bug: 14895266
Change-Id: I8ff7f5df467d7be184242de652032b3c84e24b76
This commit is contained in:
Dmitriy Ivanov
2014-05-13 18:34:48 -07:00
parent d597d263bc
commit bc23e530c4
3 changed files with 0 additions and 44 deletions

View File

@@ -37,7 +37,6 @@ class LinkerBlockAllocator {
void init(size_t block_size);
void* alloc();
void free(void* block);
void protect_page(void* block, int prot);
void protect_all(int prot);
private:
@@ -63,7 +62,6 @@ class LinkerAllocator {
void init() { block_allocator_.init(sizeof(T)); }
T* alloc() { return reinterpret_cast<T*>(block_allocator_.alloc()); }
void free(T* t) { block_allocator_.free(t); }
void protect_page(T* t, int prot) { block_allocator_.protect_page(t, prot); }
void protect_all(int prot) { block_allocator_.protect_all(prot); }
private:
LinkerBlockAllocator block_allocator_;