[Bug c++/59898] alignment problems in std::map with avx/avx2
ignat at gmx dot net
gcc-bugzilla@gcc.gnu.org
Thu Jan 23 08:44:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59898
--- Comment #2 from ignat at gmx dot net ---
(In reply to Jakub Jelinek from comment #1)
> User error. The standard allocators don't guarantee sufficient alignment
> for the vector types.
OMG, I see. Thx for clarifying. So this means that C++ is incapable of keeping
track of the alignment requirements for its types for dynamic allocation and I
so far merely got lucky with SSE as malloc happens to return 16-byte aligned
pointers on 64-bit Linux. :-(
Now that I know what to look for, I see ad-hoc fixes for this design flaw, ehm,
"feature" all over the place. Oh well, yet another stupid incantation to get
things to work ...
thx
ignatius
More information about the Gcc-bugs
mailing list