[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] i386: SSE 4 implementation does not match bare metal
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] i386: SSE 4 implementation does not match bare metal |
Date: |
Mon, 12 Oct 2015 11:51:55 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 12/10/2015 10:21, Florian Weimer wrote:
> We received a bug report that the SSE-4.2-based strstr in glibc 2.17 was
> misbehaving and returned NULL for certain inputs, even though the search
> pattern is clearly present in the subject string. I'm attaching a test
> case. You can run it as "./tst-strstr 3" to directly go to one failing
> case.
>
> I'm not sure how to debug this further, except by running the program
> under GDB, single-step through it, dump registers, and compare the
> results with a bare-metal implement after each instruction executed.
Headscratching and reading the Intel SDM is usually the best way if you
can reduce it to a single instruction (and in this case pcmpXstrX was
obviously the most likely culprit).
> Downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1270703
> There is also an attachment with a pre-compiled binary.
Patch sent, thanks for the report.
Paolo