http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55693
--- Comment #17 from Jack Howarth <howarth at nitro dot med.uc.edu> 2013-01-18 22:15:37 UTC --- A walk from f1 in the statically linked a.C testcase looks like... (gdb) b f1 Breakpoint 1 at 0x100001764: file a.C, line 2. (gdb) disp/i $pc (gdb) r Starting program: /Users/howarth/new_eh_bug/a.out Reading symbols for shared libraries +............................. done Breakpoint 1, 0x0000000100001764 in f1 () at a.C:2 2 throw 1; 1: x/i $pc 0x100001764 <f1+4>: mov $0x4,%edi (gdb) si 0x0000000100001769 2 throw 1; 1: x/i $pc 0x100001769 <f1+9>: callq 0x10000a680 <__cxa_allocate_exception> (gdb) __cxa_allocate_exception (thrown_size=4) at ../../../../gcc-4.8-20130118/libstdc++-v3/libsupc++/eh_alloc.cc:102 102 { 1: x/i $pc 0x10000a680 <__cxa_allocate_exception>: push %rbp (gdb) 105 thrown_size += sizeof (__cxa_refcounted_exception); 1: x/i $pc 0x10000a681 <__cxa_allocate_exception+1>: lea 0x80(%rdi),%rbp (gdb) 102 { 1: x/i $pc 0x10000a688 <__cxa_allocate_exception+8>: push %rbx (gdb) 106 ret = malloc (thrown_size); 1: x/i $pc 0x10000a689 <__cxa_allocate_exception+9>: mov %rbp,%rdi (gdb) 102 { 1: x/i $pc 0x10000a68c <__cxa_allocate_exception+12>: sub $0x8,%rsp (gdb) 106 ret = malloc (thrown_size); 1: x/i $pc 0x10000a690 <__cxa_allocate_exception+16>: callq 0x10001f960 <dyld_stub_malloc> (gdb) 0x000000010001f960 in dyld_stub_malloc () 1: x/i $pc 0x10001f960 <dyld_stub_malloc>: jmpq *0xc7aa(%rip) # 0x10002c110 (gdb) 0x000000010001fad0 in dyld_stub___cxa_tm_cleanup () 1: x/i $pc 0x10001fad0: pushq $0x1d3 (gdb) 0x000000010001fad5 in dyld_stub___cxa_tm_cleanup () 1: x/i $pc 0x10001fad5: jmpq 0x10001f9f8 (gdb) 0x000000010001f9f8 in dyld_stub___cxa_tm_cleanup () 1: x/i $pc 0x10001f9f8: lea 0xc661(%rip),%r11 # 0x10002c060 (gdb) 0x000000010001f9ff in dyld_stub___cxa_tm_cleanup () 1: x/i $pc 0x10001f9ff: push %r11 (gdb) 0x000000010001fa01 in dyld_stub___cxa_tm_cleanup () 1: x/i $pc 0x10001fa01: jmpq *0xc651(%rip) # 0x10002c058 (gdb) 0x00007fff847c9878 in dyld_stub_binder () 1: x/i $pc 0x7fff847c9878 <dyld_stub_binder>: push %rbp (gdb) 0x00007fff847c9879 in dyld_stub_binder () 1: x/i $pc 0x7fff847c9879 <dyld_stub_binder+1>: mov %rsp,%rbp (gdb) 0x00007fff847c987c in dyld_stub_binder () 1: x/i $pc 0x7fff847c987c <dyld_stub_binder+4>: sub $0xc0,%rsp (gdb) 0x00007fff847c9883 in dyld_stub_binder () 1: x/i $pc 0x7fff847c9883 <dyld_stub_binder+11>: mov %rdi,(%rsp) (gdb) 0x00007fff847c9887 in dyld_stub_binder () 1: x/i $pc 0x7fff847c9887 <dyld_stub_binder+15>: mov %rsi,0x8(%rsp) (gdb) 0x00007fff847c988c in dyld_stub_binder () 1: x/i $pc 0x7fff847c988c <dyld_stub_binder+20>: mov %rdx,0x10(%rsp) (gdb) 0x00007fff847c9891 in dyld_stub_binder () 1: x/i $pc 0x7fff847c9891 <dyld_stub_binder+25>: mov %rcx,0x18(%rsp) (gdb) 0x00007fff847c9896 in dyld_stub_binder () 1: x/i $pc 0x7fff847c9896 <dyld_stub_binder+30>: mov %r8,0x20(%rsp) (gdb) 0x00007fff847c989b in dyld_stub_binder () 1: x/i $pc 0x7fff847c989b <dyld_stub_binder+35>: mov %r9,0x28(%rsp) (gdb) 0x00007fff847c98a0 in dyld_stub_binder () 1: x/i $pc 0x7fff847c98a0 <dyld_stub_binder+40>: mov %rax,0x30(%rsp) (gdb) 0x00007fff847c98a5 in misaligned_stack_error_entering_dyld_stub_binder () 1: x/i $pc 0x7fff847c98a5 <misaligned_stack_error_entering_dyld_stub_binder>: movdqa %xmm0,0x40(%rsp) The testcase passes at -m32 which makes me wonder if libitm is honoring darwin's requirements of a 128 stackboundary at -m64.