From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28843 invoked by alias); 23 Jan 2014 08:44:34 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28821 invoked by uid 48); 23 Jan 2014 08:44:31 -0000 From: "ignat at gmx dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59898] alignment problems in std::map with avx/avx2 Date: Thu, 23 Jan 2014 08:44:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.7.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ignat at gmx dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg02417.txt.bz2 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