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 #12 from LluÃs <viriketo at gmail dot com> 2010-10-26 17:24:10 UTC ---
Created attachment 5086
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5086
Fix for the segfault loading pthread

I found the problem. I attach a patch.

The comment of the section I patch says:
# Most of the glibc routines don't ever call user defined callbacks
# nor use any FPU or SSE* and as such don't need bigger %esp alignment
# than 4 bytes.
# Lots of routines in math will use FPU, so make math subdir an exception
# here.

So, the problem is clear. The pthread library should be built with a 4word
stack alignment instead of 2.

Introducing more SSE into glibc should result in a constant review of this
Makefile I patch, regarding the stack alignment, although who would have known
that libpthread calls 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]