[LLVMbugs] [Bug 10789] New: TargetCodeGenInfo::getSizeOfUnwindException() should not always return 32

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 26 19:50:44 PDT 2011


           Summary: TargetCodeGenInfo::getSizeOfUnwindException() should
                    not always return 32
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ahatanak at gmail.com
                CC: llvmbugs at cs.uiuc.edu

According to what g++ outputs, the type of private_1/2 is not uint64_t.

$ g++ ue1.c -E | less

typedef unsigned _Unwind_Word __attribute__((__mode__(__unwind_word__)));

struct _Unwind_Exception
  _Unwind_Exception_Class exception_class;
  _Unwind_Exception_Cleanup_Fn exception_cleanup;
  _Unwind_Word private_1;
  _Unwind_Word private_2;
} __attribute__((__aligned__));

Therefore, getSizeOfUnwindException() should compute the size of
_Unwind_Exception based on the sizes of its members instead of hardcoding it to

The following is an excerpt from the ABI document:

In this document, we specify the Application Binary Interface for C++ programs,
that is, the object code interfaces between user C++ code and the
implementation-provided system and libraries. This includes the memory layout
for C++ data objects, including both predefined and user-defined data types, as
well as internal compiler generated objects such as virtual tables. It also
includes function calling interfaces, exception handling interfaces, global
naming, and various object code conventions.
In general, this document is written as a generic specification, to be usable
by C++ implementations on a variety of architectures. However, it does contain
processor-specific material for the Itanium 64-bit ABI, identified as such.
Where structured data layout is described, we generally assume Itanium psABI
member sizes. An implementation for a 32-bit ABI would typically just change
the sizes of members as appropriate (i.e. pointers and long ints would become
32 bits), but sometimes an order change would be required for compactness, and
we note more substantive changes.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list