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 | e413ad99ac682b3aa0b917352898818b16e50cb2 (patch) | |
| tree | a44d8894b3db0a914c0a298b5d6337b3a24f4893 /compiler-rt | |
| parent | efbb1ab92a5bb3b749f99a6661fc6cf4ce8a050f (diff) | |
| download | bcm5719-llvm-e413ad99ac682b3aa0b917352898818b16e50cb2.tar.gz bcm5719-llvm-e413ad99ac682b3aa0b917352898818b16e50cb2.zip | |
[Sanitizer] Fix compiler warnings (including void* arithmetic) in mach_override
llvm-svn: 163698
Diffstat (limited to 'compiler-rt')
| -rw-r--r-- | compiler-rt/lib/interception/mach_override/mach_override.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/interception/mach_override/mach_override.c b/compiler-rt/lib/interception/mach_override/mach_override.c index 84eb9388e72..1da877f4a48 100644 --- a/compiler-rt/lib/interception/mach_override/mach_override.c +++ b/compiler-rt/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; |

