Red Hat Bugzilla – Bug 145689
Unaligned stack pointer while initializing dynamic library
Last modified: 2007-11-30 17:10:58 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020
Description of problem:
Dynamic libraries are initialized with a stack pointer that is not
aligned to a 16 bytes boundary. This is unfortunate for those who are
using SSE2 instructions.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. untar the attached PR.tar and run make
2. set LD_LIBRARY_PATH=<PR directory>
Actual Results: ./main gives "Memory fault" while ./s-main completes
with no error.
Expected Results: Both executables should run Ok.
The test case requires SSE2 CPUs, ie Pentium 4 or x86_64 in 32 bits
compatibility mode. The problem doesn't occur in x86_64 in 64 bits mode.
Created attachment 110022 [details]
Test case using SSE2
Created attachment 110023 [details]
Proposed glibc patch
The glibc patch solved the problem for me, but I'm not a glibc expert
so there might be better ways to solve the problem.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.