diff options
author | badea@adobe.com <badea@adobe.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 15:13:14 +0000 |
---|---|---|
committer | badea@adobe.com <badea@adobe.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 15:13:14 +0000 |
commit | ac98224f74018292c6586fba6541deae85027ac4 (patch) | |
tree | 8e7890f1e5dd6a524b4bef50e29a915c023716d1 /third_party | |
parent | e8ab766c2651e5cb315346d2fed40905e402ff01 (diff) | |
download | chromium_src-ac98224f74018292c6586fba6541deae85027ac4.zip chromium_src-ac98224f74018292c6586fba6541deae85027ac4.tar.gz chromium_src-ac98224f74018292c6586fba6541deae85027ac4.tar.bz2 |
Roll mach_override to a newer version.
See https://code.google.com/p/chromium/issues/detail?id=138535#c5
Review URL: https://chromiumcodereview.appspot.com/11275073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165380 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/mach_override/README.chromium | 6 | ||||
-rw-r--r-- | third_party/mach_override/mach_override.c | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/third_party/mach_override/README.chromium b/third_party/mach_override/README.chromium index 1ad35e3..f13edb9 100644 --- a/third_party/mach_override/README.chromium +++ b/third_party/mach_override/README.chromium @@ -2,15 +2,15 @@ Name: mach_override Short Name: Part of the mach_star project Version: Unknown URL: https://github.com/rentzsch/mach_star -Date: 10/16/2012 -Revision: f8e0c424b5be5cb641ded67c265e616157ae4bcf +Date: 10/31/2012 +Revision: 34048d938af230c2c801e02d6c312f856ac4150a License: MIT Security Critical: Yes Description: This is the mach_override part of mach_star, namely: -https://github.com/rentzsch/mach_star/tree/f8e0c424b5be5cb641ded67c265e616157ae4bcf +https://github.com/rentzsch/mach_star/tree/34048d938af230c2c801e02d6c312f856ac4150a This package is used to replace framework functions with different implementations at run time. diff --git a/third_party/mach_override/mach_override.c b/third_party/mach_override/mach_override.c index db59620..64dd0ab 100644 --- a/third_party/mach_override/mach_override.c +++ b/third_party/mach_override/mach_override.c @@ -393,7 +393,7 @@ allocateBranchIsland( vm_address_t first = 0xfeffffff; vm_address_t last = 0xfe000000 + pageSize; #elif defined(__x86_64__) - vm_address_t first = (uint64_t)originalFunctionAddress & ~(uint64_t)(((uint64_t)1 << 31) - 1) | ((uint64_t)1 << 31); // start in the middle of the page? + vm_address_t first = ((uint64_t)originalFunctionAddress & ~(uint64_t)(((uint64_t)1 << 31) - 1)) | ((uint64_t)1 << 31); // start in the middle of the page? vm_address_t last = 0x0; #else vm_address_t first = 0xffc00000; @@ -583,6 +583,7 @@ static AsmInstructionMatch possibleInstructions[] = { { 0x3, {0xFF, 0x4F, 0x00}, {0x8B, 0x45, 0x00} }, // mov $imm(%ebp), %reg { 0x3, {0xFF, 0x4C, 0x00}, {0x8B, 0x40, 0x00} }, // mov $imm(%eax-%edx), %reg { 0x4, {0xFF, 0xFF, 0xFF, 0x00}, {0x8B, 0x4C, 0x24, 0x00} }, // mov $imm(%esp), %ecx + { 0x5, {0xFF, 0x00, 0x00, 0x00, 0x00}, {0xB8, 0x00, 0x00, 0x00, 0x00} }, // mov $imm, %eax { 0x0 } }; #elif defined(__x86_64__) @@ -597,6 +598,8 @@ static AsmInstructionMatch possibleInstructions[] = { { 0x2, {0xFF, 0x00}, {0x85, 0x00} }, // test %rX,%rX { 0x5, {0xF8, 0x00, 0x00, 0x00, 0x00}, {0xB8, 0x00, 0x00, 0x00, 0x00} }, // mov $imm, %reg { 0x3, {0xFF, 0xFF, 0x00}, {0xFF, 0x77, 0x00} }, // pushq $imm(%rdi) + { 0x2, {0xFF, 0xFF}, {0x31, 0xC0} }, // xor %eax, %eax + { 0x2, {0xFF, 0xFF}, {0x89, 0xF8} }, // mov %edi, %eax { 0x0 } }; #endif |