This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/206] New: malloc does not align memory correctly for sse capable systems


>From what I gather, malloc is supposed to return memory aligned respecting the 
most strict alignment requirements there are for a system. Currently this is 8 
bytes for i686 systems. This should be 16 bytes because of the __m128 type sse 
intrinsics use. 
 
See also this gcc "bug" for more details: 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15795 
 
Basically, this program segfaults: 
------------------------------------------ 
#include <xmmintrin.h>  
 
int main() {  
  __m128 * foo = new __m128;  
  *foo = _mm_setzero_ps();  
} 
------------------------------------------

-- 
           Summary: malloc does not align memory correctly for sse capable
                    systems
           Product: glibc
           Version: 2.3.3
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: ma1flfs at bath dot ac dot uk
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sources.redhat.com/bugzilla/show_bug.cgi?id=206

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]