In testing build patches for gcc 4.8 to allow darwin to have asan support, I ran across a defect in mach_override/mach_override.c... http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55289#c27 which was solved with the patch proposed by Alexander Potapenko in... http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55289#c29 Index: mach_override.c ==================================================================--- mach_override.c (revision 167724) +++ mach_override.c (working copy) @@ -725,6 +725,8 @@ { 0x2, {0xFF, 0x00}, {0x89, 0x00} }, // mov r/m32,r32 or r/m16,r16 { 0x3, {0xFF, 0xFF, 0xFF}, {0x49, 0x89, 0xF8} }, // mov %rdi,%r8 { 0x4, {0xFF, 0xFF, 0xFF, 0xFF}, {0x40, 0x0F, 0xBE, 0xCE} }, // movsbl %sil,%ecx + { 0x7, {0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00}, + {0x48, 0x8D, 0x05, 0x00, 0x00, 0x00, 0x00} }, // lea $imm(%rip),%rax { 0x3, {0xFF, 0xFF, 0xFF}, {0x0F, 0xBE, 0xCE} }, // movsbl, %dh, %ecx { 0x3, {0xFF, 0xFF, 0x00}, {0xFF, 0x77, 0x00} }, // pushq $imm(%rdi) { 0x2, {0xFF, 0xFF}, {0xDB, 0xE3} }, // fninit which produced a usable libsanitizer on x86_64 and i386 darwin. Perhaps these instances of lea aren't a problem on llvm, but I thought I ought to point this fix out as a potential change for the llvm 3.2 release. Jack
Alexander Potapenko
2012-Nov-15 08:36 UTC
[LLVMdev] potential mach_override/mach_override.c fix
Hi Jack, Thank you, I've landed this to LLVM (r168032) On Thu, Nov 15, 2012 at 6:18 AM, Jack Howarth <howarth at bromo.med.uc.edu> wrote:> In testing build patches for gcc 4.8 to allow darwin to have asan support, > I ran across a defect in mach_override/mach_override.c... > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55289#c27 > > which was solved with the patch proposed by Alexander Potapenko in... > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55289#c29 > > Index: mach_override.c > ==================================================================> --- mach_override.c (revision 167724) > +++ mach_override.c (working copy) > @@ -725,6 +725,8 @@ > { 0x2, {0xFF, 0x00}, {0x89, 0x00} }, // > mov r/m32,r32 or r/m16,r16 > { 0x3, {0xFF, 0xFF, 0xFF}, {0x49, 0x89, 0xF8} }, // > mov %rdi,%r8 > { 0x4, {0xFF, 0xFF, 0xFF, 0xFF}, {0x40, 0x0F, 0xBE, 0xCE} }, // > movsbl %sil,%ecx > + { 0x7, {0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00}, > + {0x48, 0x8D, 0x05, 0x00, 0x00, 0x00, 0x00} }, // lea > $imm(%rip),%rax > { 0x3, {0xFF, 0xFF, 0xFF}, {0x0F, 0xBE, 0xCE} }, // movsbl, %dh, %ecx > { 0x3, {0xFF, 0xFF, 0x00}, {0xFF, 0x77, 0x00} }, // pushq $imm(%rdi) > { 0x2, {0xFF, 0xFF}, {0xDB, 0xE3} }, // fninit > > which produced a usable libsanitizer on x86_64 and i386 darwin. Perhaps these > instances of lea aren't a problem on llvm, but I thought I ought to point this > fix out as a potential change for the llvm 3.2 release. > Jack > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-- Alexander Potapenko Software Engineer Google Moscow
Possibly Parallel Threads
- mach_override.c
- [LLVMdev] radr://12777299, "potential pthread/eh bug exposed by libsanitizer"
- [LLVMdev] radr://12777299, "potential pthread/eh bug exposed by libsanitizer"
- [LLVMdev] radr://12777299, "potential pthread/eh bug exposed by libsanitizer"
- [LLVMdev] radr://12777299, "potential pthread/eh bug exposed by libsanitizer"