http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55940



--- Comment #7 from Frank Mehnert <fm3 at os dot inf.tu-dresden.de> 2013-01-15 
15:37:43 UTC ---

Actually this looks like some mixup in the generated machine code:



VBoxHost_RTR0MemObjGetPagePhysAddr():

 c1b:   8b 0f                   mov    (%edi),%ecx

 c1d:   8b 47 04                mov    0x4(%edi),%eax

 c20:   8d 91 00 10 00 00       lea    0x1000(%ecx),%edx

 c26:   81 fa ff 1f 00 00       cmp    $0x1fff,%edx

 c2c:   76 49                   jbe    c77

<VBoxHost_RTR0MemObjGetPagePhysAddr+0x5c>

 c2e:   81 39 10 12 61 19       cmpl   $0x19611210,(%ecx)

 c34:   75 41                   jne    c77

<VBoxHost_RTR0MemObjGetPagePhysAddr+0x5c>

 c36:   55                      push   %ebp

 c37:   89 e5                   mov    %esp,%ebp

 c39:   57                      push   %edi

 c3a:   53                      push   %ebx

 c3b:   8b 51 08                mov    0x8(%ecx),%edx

 c3e:   8d 7d 08                lea    0x8(%ebp),%edi

 c41:   8d 5a ff                lea    -0x1(%edx),%ebx

 c44:   83 fb 07                cmp    $0x7,%ebx

 c47:   77 34                   ja     c7d

<VBoxHost_RTR0MemObjGetPagePhysAddr+0x62>



The EDI register is loaded from stack later and the two lines at 0xc1b and

0xc1d just access the EDI register before it is properly initialized.

Reply via email to