From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1975 invoked by alias); 31 Jul 2009 01:18:42 -0000 Received: (qmail 1930 invoked by uid 48); 31 Jul 2009 01:18:30 -0000 Date: Fri, 31 Jul 2009 01:18:00 -0000 Message-ID: <20090731011830.1929.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/38496] Gcc misaligns arrays when stack is forced follow the x8632 ABI In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mikulas at artax dot karlin dot mff dot cuni dot cz" 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 X-SW-Source: 2009-07/txt/msg02507.txt.bz2 ------- Comment #26 from mikulas at artax dot karlin dot mff dot cuni dot cz 2009-07-31 01:18 ------- Very unfortunatelly, gcc does assume stack alignment. The problem is not technical (the code to realign the stack is already there, it's easy to activate it), the problem is ideological, because some gcc developers think that they can declare their own ABI and the world will be changing according to them. See comments in the bug #40838. I added that alignment test at the beginning of every libc function, the result is that 75% programs in /bin misalign the stack and are non-conforming to GCC-developer's ideas about their new ABI. I also posted a simple example there that does floating point math in the function that is called as a callback from glibc --- and crashes because of SSE and unaligned stack. I really say that they should align the stack in SSE functions instead of closing this bug with WONTFIX and shouting "everyone's code is bad because we declared it so!" -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38496