[LLVMbugs] [Bug 17505] New: libcxxabi tests all failing on powerpc-darwin8, suspect unwind info incompatibility

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 7 18:35:01 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17505

            Bug ID: 17505
           Summary: libcxxabi tests all failing on powerpc-darwin8,
                    suspect unwind info incompatibility
           Product: new-bugs
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: fang at csl.cornell.edu
                CC: kledzik at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This bug is for tracking the long-standing issue of all libcxxabi tests failing
(Abort trap) on powerpc-darwin8 (latent, not recent).

Theory: suspect that unwind info emitted by CodeGen is not compatible with the
libunwind that ships with /usr/bin/libgcc_s.

I'm probably going to need some help digging through eh-frame dumps to figure
out what's wrong.

First example is unwind_01.cpp.
I'm using the clang++ from a stage1 build of the powerpc-darwin8 branch, which
tracks master.
I build all test executables with -O0 -no-integrated-as.

The clang-built unwind_01 executable gives the following dwarfdump
(--eh-frame):
=========== *PASTE* ============
Exception handling frame information for section __eh_frame

0x00000000: CIE
        length: 0x00000018
        CIE_id: 0xffffffff
       version: 0x01
  augmentation: "zPLR"
    code_align: 1
    data_align: -4
   ra_register: 0x41
  Initial Inst: DW_CFA_def_cfa (1, 0)


0x0000001c: FDE
        length: 0x00000030
   CIE_pointer: 0x00000000
    start_addr: 0xfffff28c
    range_size: 0x00000088
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (96)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset (31, -4)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (31)
                DW_CFA_nop
                DW_CFA_nop


0x00000050: CIE
        length: 0x00000010
        CIE_id: 0xffffffff
       version: 0x01
  augmentation: "zR"
    code_align: 1
    data_align: -4
   ra_register: 0x41
  Initial Inst: DW_CFA_def_cfa (1, 0)


0x00000064: FDE
        length: 0x0000002c
   CIE_pointer: 0x00000050
    start_addr: 0xfffff674
    range_size: 0x0000003c
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (80)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset (31, -4)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (31)
                DW_CFA_nop
                DW_CFA_nop


0x00000094: FDE
        length: 0x0000002c
   CIE_pointer: 0x00000050
    start_addr: 0xfffff684
    range_size: 0x0000003c
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (80)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset (31, -4)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (31)
                DW_CFA_nop
                DW_CFA_nop


0x000000c4: FDE
        length: 0x00000030
   CIE_pointer: 0x00000000
    start_addr: 0xfffff274
    range_size: 0x00000094
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (96)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset (31, -4)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (31)
                DW_CFA_nop
                DW_CFA_nop


0x000000f8: FDE
        length: 0x0000002c
   CIE_pointer: 0x00000050
    start_addr: 0xfffff6e0
    range_size: 0x0000003c
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (80)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset (31, -4)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (31)
                DW_CFA_nop
                DW_CFA_nop


0x00000128: FDE
        length: 0x00000030
   CIE_pointer: 0x00000000
    start_addr: 0xfffff2b0
    range_size: 0x000002f8
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (128)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset (31, -4)
                DW_CFA_advance_loc4 (0)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (31)
                DW_CFA_nop


0x0000015c: FDE
        length: 0x00000014
   CIE_pointer: 0x00000000
    start_addr: 0xfffff72c
    range_size: 0x00000098
  Instructions: DW_CFA_nop
                DW_CFA_nop
                DW_CFA_nop


0x00000174: FDE
        length: 0x00000014
   CIE_pointer: 0x00000000
    start_addr: 0xfffff7f4
    range_size: 0x00000098
  Instructions: DW_CFA_nop
                DW_CFA_nop
                DW_CFA_nop


0x0000018c: FDE
        length: 0x00000014
   CIE_pointer: 0x00000000
    start_addr: 0xfffff87c
    range_size: 0x00000098
  Instructions: DW_CFA_nop
                DW_CFA_nop
                DW_CFA_nop
=========== end *PASTE* ============

For comparison, I then build unwind_01-copy with g++ (system gcc 4.0.1, no
options), whose executable gives the following dwarfdump --eh-frame:

=========== *PASTE* ============
Exception handling frame information for section __eh_frame

0x00000000: CIE
        length: 0x00000018
        CIE_id: 0xffffffff
       version: 0x01
  augmentation: "zPLR"
    code_align: 1
    data_align: -4
   ra_register: 0x41
  Initial Inst: DW_CFA_def_cfa (1, 0)


0x0000001c: FDE
        length: 0x00000024
   CIE_pointer: 0x00000000
    start_addr: 0xfffffd00
    range_size: 0x0000005c
  Instructions: DW_CFA_advance_loc4 (8)
                DW_CFA_def_cfa_offset (48)
                DW_CFA_offset (31, -4)
                DW_CFA_offset (30, -8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (30)
                DW_CFA_nop


0x00000044: FDE
        length: 0x00000028
   CIE_pointer: 0x00000000
    start_addr: 0xfffffd34
    range_size: 0x00000098
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (80)
                DW_CFA_offset (31, -4)
                DW_CFA_offset (30, -8)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (30)
                DW_CFA_nop
                DW_CFA_nop


0x00000070: FDE
        length: 0x00000024
   CIE_pointer: 0x00000000
    start_addr: 0xfffffda0
    range_size: 0x0000005c
  Instructions: DW_CFA_advance_loc4 (8)
                DW_CFA_def_cfa_offset (48)
                DW_CFA_offset (31, -4)
                DW_CFA_offset (30, -8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (30)
                DW_CFA_nop


0x00000098: FDE
        length: 0x00000028
   CIE_pointer: 0x00000000
    start_addr: 0xfffffdd4
    range_size: 0x00000098
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (80)
                DW_CFA_offset (31, -4)
                DW_CFA_offset (30, -8)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (30)
                DW_CFA_nop
                DW_CFA_nop


0x000000c4: FDE
        length: 0x00000024
   CIE_pointer: 0x00000000
    start_addr: 0xfffffe40
    range_size: 0x0000005c
  Instructions: DW_CFA_advance_loc4 (8)
                DW_CFA_def_cfa_offset (48)
                DW_CFA_offset (31, -4)
                DW_CFA_offset (30, -8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (30)
                DW_CFA_nop


0x000000ec: FDE
        length: 0x00000028
   CIE_pointer: 0x00000000
    start_addr: 0xfffffe74
    range_size: 0x00000098
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (80)
                DW_CFA_offset (31, -4)
                DW_CFA_offset (30, -8)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (30)
                DW_CFA_nop
                DW_CFA_nop


0x00000118: FDE
        length: 0x00000028
   CIE_pointer: 0x00000000
    start_addr: 0xfffff340
    range_size: 0x00000090
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (96)
                DW_CFA_offset (31, -4)
                DW_CFA_offset (30, -8)
                DW_CFA_offset (29, -12)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (30)


0x00000144: FDE
        length: 0x00000028
   CIE_pointer: 0x00000000
    start_addr: 0xfffff3a4
    range_size: 0x000000ac
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (96)
                DW_CFA_offset (31, -4)
                DW_CFA_offset (30, -8)
                DW_CFA_offset (29, -12)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (30)


0x00000170: FDE
        length: 0x00000028
   CIE_pointer: 0x00000000
    start_addr: 0xfffff424
    range_size: 0x000002b4
  Instructions: DW_CFA_advance_loc4 (16)
                DW_CFA_def_cfa_offset (96)
                DW_CFA_offset (31, -4)
                DW_CFA_offset (30, -8)
                DW_CFA_offset (29, -12)
                DW_CFA_offset_extended_sf (65, 8)
                DW_CFA_advance_loc4 (4)
                DW_CFA_def_cfa_register (30)
=========== end *PASTE* ============

In summary, they are quite different.  I just don't know how different they can
be, and still be functional/compatible.
Any hints on how to debug further?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131008/c5b2472e/attachment.html>


More information about the llvm-bugs mailing list