[LLVMbugs] [Bug 18173] New: [-cxx-abi microsoft] Crash while laying out field in packed struct

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Dec 7 15:51:39 PST 2013


            Bug ID: 18173
           Summary: [-cxx-abi microsoft] Crash while laying out field in
                    packed struct
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

#if defined(__clang__) || defined(__GNUC__)
typedef __SIZE_TYPE__ size_t;
static char buffer[419430400];
inline void *operator new(size_t, void *pv) {}
struct ClassName0 {};
#pragma pack(push, 2)
struct ClassName1 {
  float ClassName1FieldName0;
  virtual void ClassName1Method() {}
#pragma pack(pop)
struct ClassName2 {
  virtual void ClassName2Method() {}
static void test_layout(const char *class_name, size_t size_of_class,
                        size_t align_of_class) {}
template <typename Class>
static void init_mem() {
  new (buffer) Class;
#define test(Class) \
  init_mem<Class>(), test_layout(#Class, sizeof(Class), __alignof(Class))
int main() { test(ClassName1); }

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/20131207/934dd1ad/attachment.html>

More information about the llvm-bugs mailing list