[LLVMbugs] [Bug 22634] New: std::vector doesn't honor element alignment

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Feb 19 08:20:07 PST 2015


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

            Bug ID: 22634
           Summary: std::vector doesn't honor element alignment
           Product: libc++
           Version: 3.5
          Hardware: Macintosh
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jacob.benoit.1 at gmail.com
                CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
    Classification: Unclassified

Created attachment 13905
  --> http://llvm.org/bugs/attachment.cgi?id=13905&action=edit
testcase

Even in C++11 mode, even with the C++11 alignas keyword, element alignment
isn't honored by std::vector.

$ c++ vectoralign.cpp -o a --std=c++11 && ./a
ctor 0x7fec03c03950
ctor 0x7fec03c03990

Attaching testcase.

I only tested the 3.5svn version that's installed on Mac OSX 10.9.5 here.

$ c++ --version
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

Note: homologous libstdc++ bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122

-- 
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/20150219/93b14cb9/attachment.html>


More information about the llvm-bugs mailing list