#5019: OS X: ld: warning: could not create compact unwind for _ffi_call_unix64
-------------------------------+--------------------------------------------
    Reporter:  altaic          |       Owner:                                   
        Type:  bug             |      Status:  new                              
    Priority:  normal          |   Component:  Compiler                         
     Version:  7.1             |    Keywords:                                   
    Testcase:                  |   Blockedby:                                   
          Os:  MacOS X         |    Blocking:                                   
Architecture:  x86_64 (amd64)  |     Failure:  Incorrect warning at compile-time
-------------------------------+--------------------------------------------
 The OS X 10.6 linker now defaults to creating compact unwinds, which is a
 good thing, however the unwind info for `_ffi_call_unix64` can't be
 represented in the compact format. This warning is issued any time ghc
 links, and many tests in the test suite fail due to the extra output:

 {{{
 ld: warning: could not create compact unwind for _ffi_call_unix64: does
 not use RBP or RSP based frame
 }}}

 Possible solutions:
  * suppress the warning in ld; unfortunately this does not seem to be
 possible, since the only applicable option is `-warn_compact_unwind` which
 enables the already enabled-by-default warnings
  * suppress the warning in ghc; I haven't really looked into this, but one
 could filter the text output from the linker to remove the warning
  * entirely disable compact unwinds using `-no_compact_unwind`; this flag
 is undocumented, so I'm not certain about what it really does
  * patch `_ffi_call_unix64` in libffi to make it compatible with compact
 unwinds

 Info about compact unwinds in OS X 10.6 is somewhat scarce, but `man
 unwinddump` has a bit:
 {{{
 When a C++ (or x86_64 Objective-C) exception is thrown, the runtime must
 unwind the
 stack looking for some function to catch the exception.  Traditionally,
 the unwind
 information is stored in the __TEXT/__eh_frame section of each executable
 as Dwarf
 CFI (call frame information).  Beginning in Mac OS X 10.6, the unwind
 information is
 also encoded in the __TEXT/__unwind_info section using a two-level lookup
 table of
 compact unwind encodings.

 The unwinddump tool displays the content of the __TEXT/__unwind_info
 section.
 }}}

 Relevant discussions:

 [http://groups.google.com/group/llvm-
 dev/browse_thread/thread/8baba4531a9feb07/139c9eba3525ebe]
 [http://groups.google.com/group/darwin-
 dev/browse_thread/thread/962f74bde0efaae4/cfb63dfb3ac34ce1]

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5019>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to