Subsurface crashes on launch in OS Mavericks

Thiago Macieira thiago at macieira.org
Sun Jan 12 08:51:50 UTC 2014


On domingo, 12 de janeiro de 2014 08:43:38, Thiago Macieira wrote:
> PS: GCC probably generated the prologue, the body of the constructor that
> just  needs to reset the virtual pointers, then epilogue, then optimised
> the body out. Here's what the same function does on my 4.7.2 LTO build:
> 
> 0000003231706a40 <_ZN14QDesktopWidgetD1Ev>:
>   3231706a40:   mov    0x4403a9(%rip),%rax        # 3231b46df0 
> <_DYNAMIC+0x1558>
>   3231706a47:   lea    0x10(%rax),%rdx
>   3231706a4b:   add    $0x1d0,%rax
>   3231706a51:   mov    %rdx,(%rdi)
>   3231706a54:   mov    %rax,0x10(%rdi)
>   3231706a58:   jmpq   3231702120 <_ZN7QWidgetD1Ev>
>   3231706a5d:   nopl   (%rax)
> 
> Here, GCC optimised the prologue and epilogue out, but left the virtual
> table  update.

Looks like optimising the virtual table update away is an LLVM optimisation. 
This is the Clang 3.4 build on my Linux machine:
00000000001a3740 <_ZN14QDesktopWidgetD1Ev>:
  1a3740:       jmpq   17bc30 <_ZN7QWidgetD1Ev>
  1a3745:       data32 nopw %cs:0x0(%rax,%rax,1)


And this is what ICC generates:
00000000002042a0 <_ZN14QDesktopWidgetD1Ev>:
  2042a0:       lea    0x7a8fe9(%rip),%rax        # 9ad290 
<_ZTV14QDesktopWidget+0x10>
  2042a7:       lea    0x7a9192(%rip),%rdx        # 9ad440 
<_ZTV14QDesktopWidget+0x1c0>
  2042ae:       mov    %rax,(%rdi)
  2042b1:       mov    %rdx,0x10(%rdi)
  2042b5:       jmpq   1d39c0 <_ZN7QWidgetD2Ev>
  2042ba:       nopw   0x0(%rax,%rax,1)

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140112/a473a3c2/attachment.sig>


More information about the subsurface mailing list