This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12123] SIGBUS on strstr_sse42 due to bad alignment
- From: "viriketo at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Tue, 26 Oct 2010 07:51:10 +0000
- Subject: [Bug libc/12123] SIGBUS on strstr_sse42 due to bad alignment
- Auto-submitted: auto-generated
- References: <bug-12123-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12123
--- Comment #5 from LluÃs <viriketo at gmail dot com> 2010-10-26 07:50:57 UTC ---
Sorry, but I don't think the problem is in the strstr file.
As the traces show, the code in strstr is properly compiled and looks good.
Simply gcc assumed at the start of the function the code will be stack-aligned.
Before main() in C programs, the libc assures that the stack is aligned. And
gcc assures that no function misaligns the stack.
But the problem I mention happens in a strstr() call *BEFORE* main(), in the
dynamic loader, where the stack may not be aligned. And then, any SIMD code
compiled by gcc will fail, because the assumption of aligned stack looks like
not being true at that moment.
I think this problem is more of the dynamic loader, which should assure an
aligned stack before calling anything like strstr().
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.