This is the mail archive of the
mailing list for the glibc project.
Re: Potential issue with strstr on x86 with sse4.2 in glibc-2.18
- From: Rich Felker <dalias at aerifal dot cx>
- To: Alexander Monakov <amonakov at ispras dot ru>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 19 Aug 2013 14:07:22 -0400
- Subject: Re: Potential issue with strstr on x86 with sse4.2 in glibc-2.18
- References: <520E181D dot 2040308 at archlinux dot org> <alpine dot LNX dot 2 dot 00 dot 1308191628370 dot 2626 at monopod dot intra dot ispras dot ru> <20130819144648 dot GF20515 at brightrain dot aerifal dot cx> <alpine dot LNX dot 2 dot 00 dot 1308191924490 dot 2626 at monopod dot intra dot ispras dot ru> <20130819163712 dot GG20515 at brightrain dot aerifal dot cx> <alpine dot LNX dot 2 dot 00 dot 1308192045480 dot 2626 at monopod dot intra dot ispras dot ru> <20130819170550 dot GH20515 at brightrain dot aerifal dot cx> <CABtfrpCaT2tzBCcnuNPUryiPkJbSytm7b+JOVf_jCFQMFAAvEw at mail dot gmail dot com>
On Mon, Aug 19, 2013 at 09:34:10PM +0400, Alexander Monakov wrote:
> On Mon, Aug 19, 2013 at 9:05 PM, Rich Felker <firstname.lastname@example.org> wrote:
> > Yes, by default, but just because the default is -march=i486. This is
> > not needed to avoid SSE alignment bugs, though, because GCC preserves
> > the stack alignment mod 16 anyway unless you override that behavior.
> I think sufficiently old GCC will not align mod 16. Incidentally, I
> guess this is why this failure is observed: fglrx folks need to
> produce a binary driver that works on ancient distros, and an easy way
> to achieve that is to compile it on an ancient distro with an ancient
> userland (and GCC) in the first place.
That sounds like a plausible explanation, actually. Are you aware of
the GCC version where alignment was first introduced?