The following reply was made to PR ports/186541; it has been noted by GNATS.

From: Don Lewis <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: ports/186541: installing www/libxul fails
Date: Wed, 26 Feb 2014 12:34:40 -0800 (PST)

 I did a bunch of single stepping in gdb and found this:
 
 0x8965ade0 in mozilla::services::_external_GetHistoryService ()
    from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/dist/bin//libxul.so
 (gdb) 
 0x8965ade1 in mozilla::services::_external_GetHistoryService ()
    from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/dist/bin//libxul.so
 (gdb) 
 0x8965ade2 in mozilla::services::_external_GetHistoryService ()
    from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/dist/bin//libxul.so
 (gdb) 
 0x8833308d in XRE_GetBinaryPath ()
    from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/dist/bin//libxul.so
 (gdb) 
 
 Program received signal SIGILL, Illegal instruction.
 0x8833308d in XRE_GetBinaryPath ()
    from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/dist/bin//libxul.so
 (gdb) 
 
 
 If I disassemble the offending bit of code, I see this:
 
 0x88333083 <XRE_GetBinaryPath+195>:    mov    %ecx,(%eax)
 0x88333085 <XRE_GetBinaryPath+197>:    mov    (%ecx),%eax
 0x88333087 <XRE_GetBinaryPath+199>:    mov    %ecx,(%esp)
 0x8833308a <XRE_GetBinaryPath+202>:    call   *0x4(%eax)
 0x8833308d <XRE_GetBinaryPath+205>:    ud2a   
 0x8833308f <XRE_GetBinaryPath+207>:    nop    
 0x88333090 <XRE_GetBinaryPath+208>:    push   %ebp
 0x88333091 <XRE_GetBinaryPath+209>:    mov    %esp,%ebp
 0x88333093 <XRE_GetBinaryPath+211>:    push   %ebx
 
 A bit of searching with google, turned up this page:
 
<http://peeterjoot.wordpress.com/2010/05/26/a-fun-and-curious-dig-gcc-generation-of-a-ud2a-instruction-sigill/>
 
 The ud2a instruction is guaranteed invalid, hence the SIGILL. Apparently
 gcc will sometimes insert these on purpose if it sees some code that it
 doesn't like, but I'm compiling with clang.
 
 I do see a lot of complaints from clang when compiling the offending
 file:
 
 # /usr/bin/clang++ -o nsAppRunner.o -c -fvisibility=hidden -DUSE_GLX_TEST 
-DMOZ_APP_NAME='"firefox"' -DMOZ_APP_VERSION='"27.0.1"' -DOS_POSIX=1 
-DOS_FREEBSD=1 -DOS_BSD=1 -DMOZ_GLUE_IN_PROGRAM -DMOZILLA_INTERNAL_API 
-DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -DNO_NSPR_10_SUPPORT 
-DOS_TARGET=\"FreeBSD\" -DMOZ_WIDGET_TOOLKIT=\"gtk2\" 
-DTARGET_XPCOM_ABI=\"x86-gcc3\" -DTARGET_OS_ABI=\"FreeBSD_x86-gcc3\" 
-DTOOLKIT_EM_VERSION=\"27.0.1\" -DGRE_MILESTONE=27.0.1 
-DGRE_BUILDID=20140225233802 -DAPP_VERSION=27.0.1 -DAPP_I 
D="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" -I../../../widget/xremoteclient 
-I../../../ipc/chromium/src -I../../../ipc/glue 
-I/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders
 -I../../../testing/gtest/mozilla -I../../../toolkit/xre/../profile 
-I../../../dom/ipc -I../../../toolkit/crashreporter -I../../../dom/base 
-I../../../xpcom/build -I../../../config -I../../../toolkit/xre -I. 
-I../../dist/include -I/usr/local/include/nspr -I/u!
  sr/local/include/nss -I/usr/local/include/nss/nss -I/usr/local/include 
-I/usr/local/include -fPIC -Qunused-arguments -isystem/usr/local/include 
-DLIBICONV_PLUG -I/usr/local/include -DMOZILLA_CLIENT -include 
../../mozilla-config.h -MD -MP -MF .deps/nsAppRunner.o.pp -Qunused-arguments 
-isystem/usr/local/include -DLIBICONV_PLUG -I/usr/local/include 
-Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual 
-Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare 
-Wno-invalid-offsetof -Wno-c++0x-exten sions -Wno-extended-offsetof 
-Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags -O2 
-pipe -march=athlon64 -DLIBICONV_PLUG -fno-strict-aliasing -DLIBICONV_PLUG 
-fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections 
-fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pipe -DNDEBUG 
-DTRIMMED -fno-omit-frame-pointer -I../../../widget/gtk/compat 
-I/usr/local/include/gtk-unix-print-2.0 -I/usr/local/include/atk-1.0 
-I/usr/local/includ!
  e/harfbuzz -I/usr/local/include/gtk-2.0 -I/usr/local/include/pango-1.0
  -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/gdk-pixbuf-2.0 
-pthread -I/usr/local/include/cairo -I/usr/local/include/glib-2.0 
-I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 
-I/usr/local/include/libpng15 -D_THREAD_SAFE -I/usr/local/include 
-I/usr/local/include/dbus-1.0 -I/usr/local/include/dbus-1.0/include 
-I/usr/local/include/dbus-1.0 -I/usr/local/include/dbus-1.0/include 
-I/usr/local/include/glib-2.0 -I/usr/local/include 
-I/usr/local/include/harfbuzz -I/usr/local/include/pango-1. 0 -pthread 
-I/usr/local/include/cairo -I/usr/local/include/glib-2.0 
-I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 
-I/usr/local/include/libpng15 -D_THREAD_SAFE -I/usr/local/include 
-I/usr/local/include -I/usr/local/include/freetype2 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp 
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:21:
 In file included from ../../dist/include/mozilla/dom/ContentParent.h:10:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContentParent.h:9:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContent.h:12:
 In file included from ../../dist/include/ipc/IPCMessageUtils.h:10:
 In file included from ../../../ipc/chromium/src/base/process_util.h:11:
 In file included from ../../../ipc/chromium/src/base/basictypes.h:252:
 In file included from ../../dist/include/nscore.h:19:
 ../../dist/include/mozilla/mozalloc.h:198:21: warning: replacement function
       'operator new' cannot be declared 'inline' [-Winline-new-delete]
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
                     ^
 ../../dist/include/mozilla/mozalloc.h:44:27: note: expanded from macro
       'MOZALLOC_INLINE'
 #  define MOZALLOC_INLINE MOZ_ALWAYS_INLINE_EVEN_DEBUG
                           ^
 ../../dist/include/mozilla/Attributes.h:27:75: note: expanded from macro
       'MOZ_ALWAYS_INLINE_EVEN_DEBUG'
 #  define MOZ_ALWAYS_INLINE_EVEN_DEBUG     __attribute__((always_inline)) 
inline
                                                                           ^
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:21:
 In file included from ../../dist/include/mozilla/dom/ContentParent.h:10:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContentParent.h:9:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContent.h:12:
 In file included from ../../dist/include/ipc/IPCMessageUtils.h:10:
 In file included from ../../../ipc/chromium/src/base/process_util.h:11:
 In file included from ../../../ipc/chromium/src/base/basictypes.h:252:
 In file included from ../../dist/include/nscore.h:19:
 ../../dist/include/mozilla/mozalloc.h:204:21: warning: replacement function
       'operator new' cannot be declared 'inline' [-Winline-new-delete]
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
                     ^
 ../../dist/include/mozilla/mozalloc.h:44:27: note: expanded from macro
       'MOZALLOC_INLINE'
 #  define MOZALLOC_INLINE MOZ_ALWAYS_INLINE_EVEN_DEBUG
                           ^
 ../../dist/include/mozilla/Attributes.h:27:75: note: expanded from macro
       'MOZ_ALWAYS_INLINE_EVEN_DEBUG'
 #  define MOZ_ALWAYS_INLINE_EVEN_DEBUG     __attribute__((always_inline)) 
inline
                                                                           ^
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:21:
 In file included from ../../dist/include/mozilla/dom/ContentParent.h:10:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContentParent.h:9:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContent.h:12:
 In file included from ../../dist/include/ipc/IPCMessageUtils.h:10:
 In file included from ../../../ipc/chromium/src/base/process_util.h:11:
 In file included from ../../../ipc/chromium/src/base/basictypes.h:252:
 In file included from ../../dist/include/nscore.h:19:
 ../../dist/include/mozilla/mozalloc.h:210:21: warning: replacement function
       'operator new[]' cannot be declared 'inline' [-Winline-new-delete]
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
                     ^
 ../../dist/include/mozilla/mozalloc.h:44:27: note: expanded from macro
       'MOZALLOC_INLINE'
 #  define MOZALLOC_INLINE MOZ_ALWAYS_INLINE_EVEN_DEBUG
                           ^
 ../../dist/include/mozilla/Attributes.h:27:75: note: expanded from macro
       'MOZ_ALWAYS_INLINE_EVEN_DEBUG'
 #  define MOZ_ALWAYS_INLINE_EVEN_DEBUG     __attribute__((always_inline)) 
inline
                                                                           ^
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:21:
 In file included from ../../dist/include/mozilla/dom/ContentParent.h:10:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContentParent.h:9:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContent.h:12:
 In file included from ../../dist/include/ipc/IPCMessageUtils.h:10:
 In file included from ../../../ipc/chromium/src/base/process_util.h:11:
 In file included from ../../../ipc/chromium/src/base/basictypes.h:252:
 In file included from ../../dist/include/nscore.h:19:
 ../../dist/include/mozilla/mozalloc.h:216:21: warning: replacement function
       'operator new[]' cannot be declared 'inline' [-Winline-new-delete]
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
                     ^
 ../../dist/include/mozilla/mozalloc.h:44:27: note: expanded from macro
       'MOZALLOC_INLINE'
 #  define MOZALLOC_INLINE MOZ_ALWAYS_INLINE_EVEN_DEBUG
                           ^
 ../../dist/include/mozilla/Attributes.h:27:75: note: expanded from macro
       'MOZ_ALWAYS_INLINE_EVEN_DEBUG'
 #  define MOZ_ALWAYS_INLINE_EVEN_DEBUG     __attribute__((always_inline)) 
inline
                                                                           ^
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:21:
 In file included from ../../dist/include/mozilla/dom/ContentParent.h:10:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContentParent.h:9:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContent.h:12:
 In file included from ../../dist/include/ipc/IPCMessageUtils.h:10:
 In file included from ../../../ipc/chromium/src/base/process_util.h:11:
 In file included from ../../../ipc/chromium/src/base/basictypes.h:252:
 In file included from ../../dist/include/nscore.h:19:
 ../../dist/include/mozilla/mozalloc.h:222:21: warning: replacement function
       'operator delete' cannot be declared 'inline' [-Winline-new-delete]
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
                     ^
 ../../dist/include/mozilla/mozalloc.h:44:27: note: expanded from macro
       'MOZALLOC_INLINE'
 #  define MOZALLOC_INLINE MOZ_ALWAYS_INLINE_EVEN_DEBUG
                           ^
 ../../dist/include/mozilla/Attributes.h:27:75: note: expanded from macro
       'MOZ_ALWAYS_INLINE_EVEN_DEBUG'
 #  define MOZ_ALWAYS_INLINE_EVEN_DEBUG     __attribute__((always_inline)) 
inline
                                                                           ^
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:21:
 In file included from ../../dist/include/mozilla/dom/ContentParent.h:10:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContentParent.h:9:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContent.h:12:
 In file included from ../../dist/include/ipc/IPCMessageUtils.h:10:
 In file included from ../../../ipc/chromium/src/base/process_util.h:11:
 In file included from ../../../ipc/chromium/src/base/basictypes.h:252:
 In file included from ../../dist/include/nscore.h:19:
 ../../dist/include/mozilla/mozalloc.h:228:21: warning: replacement function
       'operator delete' cannot be declared 'inline' [-Winline-new-delete]
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
                     ^
 ../../dist/include/mozilla/mozalloc.h:44:27: note: expanded from macro
       'MOZALLOC_INLINE'
 #  define MOZALLOC_INLINE MOZ_ALWAYS_INLINE_EVEN_DEBUG
                           ^
 ../../dist/include/mozilla/Attributes.h:27:75: note: expanded from macro
       'MOZ_ALWAYS_INLINE_EVEN_DEBUG'
 #  define MOZ_ALWAYS_INLINE_EVEN_DEBUG     __attribute__((always_inline)) 
inline
                                                                           ^
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:21:
 In file included from ../../dist/include/mozilla/dom/ContentParent.h:10:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContentParent.h:9:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContent.h:12:
 In file included from ../../dist/include/ipc/IPCMessageUtils.h:10:
 In file included from ../../../ipc/chromium/src/base/process_util.h:11:
 In file included from ../../../ipc/chromium/src/base/basictypes.h:252:
 In file included from ../../dist/include/nscore.h:19:
 ../../dist/include/mozilla/mozalloc.h:234:21: warning: replacement function
       'operator delete[]' cannot be declared 'inline' [-Winline-new-delete]
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
                     ^
 ../../dist/include/mozilla/mozalloc.h:44:27: note: expanded from macro
       'MOZALLOC_INLINE'
 #  define MOZALLOC_INLINE MOZ_ALWAYS_INLINE_EVEN_DEBUG
                           ^
 ../../dist/include/mozilla/Attributes.h:27:75: note: expanded from macro
       'MOZ_ALWAYS_INLINE_EVEN_DEBUG'
 #  define MOZ_ALWAYS_INLINE_EVEN_DEBUG     __attribute__((always_inline)) 
inline
                                                                           ^
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:21:
 In file included from ../../dist/include/mozilla/dom/ContentParent.h:10:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContentParent.h:9:
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd11.0/ipc/ipdl/_ipdlheaders/mozilla/dom/PContent.h:12:
 In file included from ../../dist/include/ipc/IPCMessageUtils.h:10:
 In file included from ../../../ipc/chromium/src/base/process_util.h:11:
 In file included from ../../../ipc/chromium/src/base/basictypes.h:252:
 In file included from ../../dist/include/nscore.h:19:
 ../../dist/include/mozilla/mozalloc.h:240:21: warning: replacement function
       'operator delete[]' cannot be declared 'inline' [-Winline-new-delete]
 MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
                     ^
 ../../dist/include/mozilla/mozalloc.h:44:27: note: expanded from macro
       'MOZALLOC_INLINE'
 #  define MOZALLOC_INLINE MOZ_ALWAYS_INLINE_EVEN_DEBUG
                           ^
 ../../dist/include/mozilla/Attributes.h:27:75: note: expanded from macro
       'MOZ_ALWAYS_INLINE_EVEN_DEBUG'
 #  define MOZ_ALWAYS_INLINE_EVEN_DEBUG     __attribute__((always_inline)) 
inline
                                                                           ^
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:233:
 In file included from /usr/local/include/gtk-2.0/gtk/gtk.h:33:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkaboutdialog.h:32:
 In file included from ../../../widget/gtk/compat/gtk/gtkdialog.h:4:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkdialog.h:35:
 In file included from ../../../widget/gtk/compat/gtk/gtkwindow.h:9:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkwindow.h:36:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkbin.h:35:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkcontainer.h:35:
 In file included from ../../../widget/gtk/compat/gtk/gtkwidget.h:12:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkwidget.h:40:
 In file included from /usr/local/include/atk-1.0/atk/atk.h:53:
 /usr/local/include/atk-1.0/atk/atkversion.h:39:9: warning: 'ATK_MAJOR_VERSION'
       macro redefined
 #define ATK_MAJOR_VERSION (2)
         ^
 ../../mozilla-config.h:10:9: note: previous definition is here
 #define ATK_MAJOR_VERSION 2
         ^
 In file included from 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:233:
 In file included from /usr/local/include/gtk-2.0/gtk/gtk.h:33:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkaboutdialog.h:32:
 In file included from ../../../widget/gtk/compat/gtk/gtkdialog.h:4:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkdialog.h:35:
 In file included from ../../../widget/gtk/compat/gtk/gtkwindow.h:9:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkwindow.h:36:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkbin.h:35:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkcontainer.h:35:
 In file included from ../../../widget/gtk/compat/gtk/gtkwidget.h:12:
 In file included from /usr/local/include/gtk-2.0/gtk/gtkwidget.h:40:
 In file included from /usr/local/include/atk-1.0/atk/atk.h:53:
 /usr/local/include/atk-1.0/atk/atkversion.h:50:9: warning: 'ATK_MINOR_VERSION'
       macro redefined
 #define ATK_MINOR_VERSION (8)
         ^
 ../../mozilla-config.h:11:9: note: previous definition is here
 #define ATK_MINOR_VERSION 8
         ^
 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:4017:3: 
warning: 
       'g_slice_set_config' is deprecated [-Wdeprecated-declarations]
   g_slice_set_config(G_SLICE_CONFIG_ALWAYS_MALLOC, 1);
   ^
 /usr/local/include/glib-2.0/glib/gslice.h:87:10: note: 'g_slice_set_config'
       declared here
 void     g_slice_set_config        (GSliceConfig ckey, gint64 value);
          ^
 
/usr/ports/www/firefox/work/mozilla-release/toolkit/xre/nsAppRunner.cpp:4019:3: 
warning: 
       'g_thread_init' is deprecated [-Wdeprecated-declarations]
   g_thread_init(nullptr);
   ^
 /usr/local/include/glib-2.0/glib/deprecated/gthread.h:261:10: note: 
       'g_thread_init' declared here
 void     g_thread_init                   (gpointer vtable);
          ^
 12 warnings generated.
 
 
 If I compile the file to assembler, this is what I see for
 XRE_GetBinaryPath():
 
        .section        .text.XRE_GetBinaryPath,"ax",@progbits
        .globl  XRE_GetBinaryPath
        .align  16, 0x90
        .type   XRE_GetBinaryPath,@function
 XRE_GetBinaryPath:                      # @XRE_GetBinaryPath
 # BB#0:                                 # %entry
        pushl   %ebp
        movl    %esp, %ebp
        pushl   %ebx
        subl    $8, %esp
        calll   .L50$pb
 .L50$pb:
        popl    %ebx
 .Ltmp92:
        addl    $_GLOBAL_OFFSET_TABLE_+(.Ltmp92-.L50$pb), %ebx
        movl    8(%ebp), %eax
        movl    12(%ebp), %ecx
        movl    %ecx, 4(%esp)
        movl    %eax, (%esp)
        calll   _ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile
 .Ltmp93:
        .size   XRE_GetBinaryPath, .Ltmp93-XRE_GetBinaryPath
 
        .section        
.text._ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile,"axG",@progbits,_ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile,comdat
        .hidden _ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile
        .weak   _ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile
        .align  16, 0x90
        .type   _ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile,@function
 _ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile: # 
@_ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile
 # BB#0:                                 # %entry
        pushl   %ebp
        movl    %esp, %ebp
        pushl   %ebx
        pushl   %edi
        pushl   %esi
        andl    $-8, %esp
        subl    $1064, %esp             # imm = 0x428
        calll   .L51$pb
 .L51$pb:
        popl    %ebx
 .Ltmp94:
        addl    $_GLOBAL_OFFSET_TABLE_+(.Ltmp94-.L51$pb), %ebx
        movl    8(%ebp), %eax
        movl    $0, 1056(%esp)
        leal    32(%esp), %esi
        movl    %esi, 4(%esp)
        movl    %eax, (%esp)
        calll   _ZN7mozilla10BinaryPath3GetEPKcPc
        testl   %eax, %eax
        js      .LBB51_3
 # BB#1:                                 # %if.end
        movl    %esi, (%esp)
        calll   strlen@PLT
        movl    %esi, 16(%esp)
        movl    %eax, 20(%esp)
        movl    $1, 24(%esp)
        leal    1056(%esp), %eax
        calll   _ZN13nsCOMPtr_base16begin_assignmentEv@PLT
        movl    %eax, 8(%esp)
        leal    16(%esp), %esi
        movl    %esi, (%esp)
        movl    $1, 4(%esp)
        calll   NS_NewNativeLocalFile@PLT
        movl    %eax, %edi
        movl    %esi, %eax
        calll   _ZN19nsACString_internal8FinalizeEv@PLT
        testl   %edi, %edi
        js      .LBB51_3
 # BB#2:                                 # %if.end16
        movl    12(%ebp), %eax
        movl    1056(%esp), %ecx
        movl    %ecx, (%eax)
        movl    (%ecx), %eax
        movl    %ecx, (%esp)
        calll   *4(%eax)
 .LBB51_3:                               # %cleanup
        ud2
 .Ltmp95:
        .size   _ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile, 
.Ltmp95-_ZN7mozilla10BinaryPath7GetFileEPKcPP7nsIFile
 
 
 And sure enough, the function ends with a ud2 instruction!  It's not the
 only one in this file, either.  So if this a compiler bug, why isn't
 everyone seeing it?
 
 I don't see the ud2 instructions when I compile with gcc, so my problem
 looks like it is different that the original one in this PR, so I'm
 going to open a PR to report my problem as a clang bug.
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-gecko
To unsubscribe, send any mail to "[email protected]"

Reply via email to