diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-09-12 10:45:36 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-09-12 10:45:36 +0000 |
commit | 246ef3b045ba183ede4eb4635e31cd477aa91cf5 (patch) | |
tree | 4eed313b4a60d77e34201faabe6ece933b8d5cab /lib/interception | |
parent | c27279a4a08e0661f204c3e5dc65aafce79dec8a (diff) |
[Sanitizer] Fix compiler warnings (including void* arithmetic) in mach_override
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163698 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/interception')
-rw-r--r-- | lib/interception/mach_override/mach_override.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/interception/mach_override/mach_override.c b/lib/interception/mach_override/mach_override.c index 84eb9388e..1da877f4a 100644 --- a/lib/interception/mach_override/mach_override.c +++ b/lib/interception/mach_override/mach_override.c @@ -682,7 +682,7 @@ static AsmInstructionMatch possibleInstructions[] = { { 0x2, {0xFF, 0xFF}, {0xDB, 0xE3} }, // fninit { 0x5, {0xFF, 0x00, 0x00, 0x00, 0x00}, {0xE8, 0x00, 0x00, 0x00, 0x00} }, // call $imm { 0x4, {0xFF, 0xFF, 0xFF, 0x00}, {0x0F, 0xBE, 0x55, 0x00} }, // movsbl $imm(%ebp), %edx - { 0x0 } + { 0x0, {0x00}, {0x00} } }; #elif defined(__x86_64__) // TODO(glider): disassembling the "0x48, 0x89" sequences is trickier than it's done below. @@ -729,7 +729,7 @@ static AsmInstructionMatch possibleInstructions[] = { { 0x3, {0xFF, 0xFF, 0x00}, {0xFF, 0x77, 0x00} }, // pushq $imm(%rdi) { 0x2, {0xFF, 0xFF}, {0xDB, 0xE3} }, // fninit { 0x3, {0xFF, 0xFF, 0xFF}, {0x48, 0x85, 0xD2} }, // test %rdx,%rdx - { 0x0 } + { 0x0, {0x00}, {0x00} } }; #endif @@ -876,7 +876,7 @@ fixupInstructions( // This is critical, otherwise a near jump will likely fall outside the original function. uint32_t offset = (uintptr_t)initialOriginalFunction - (uintptr_t)escapeIsland; uint32_t jumpOffset = *(uint8_t*)((uintptr_t)instructionsToFix + 1); - *(uint8_t*)(instructionsToFix + 1) = *(uint8_t*)instructionsToFix + 0x10; + *((uint8_t*)instructionsToFix + 1) = *(uint8_t*)instructionsToFix + 0x10; *(uint8_t*)instructionsToFix = 0x0F; uint32_t *jumpOffsetPtr = (uint32_t*)((uintptr_t)instructionsToFix + 2 ); *jumpOffsetPtr = offset + jumpOffset; |