This is the mail archive of the glibc-bugs@sourceware.org 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/12123] SIGBUS on strstr_sse42 due to bad alignment


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.


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