[LLVMbugs] [Bug 9307] New: clang-2.9 miscompiles FFmpeg's VP8 decoder

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 23 15:16:21 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=9307

           Summary: clang-2.9 miscompiles FFmpeg's VP8 decoder
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rsbultje at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Hi,

clang-2.9 (but not 2.8) miscompiles FFmpeg's VP8 decoder since a while. The
failing testsuite can be found here fore x86-32:
http://fate.ffmpeg.org/x86_32-freebsd-clang/20110223164516
and here for x86-64:
http://fate.ffmpeg.org/x86_64-linux-clang/20110223163508
the vp8 testsuite passes for other compilers.

The bug can be worked around by compiling vp8.c using -O1 instead of -O3. -O0
also works fine, -O2 also miscompiles. Under any other compiler (e.g. gcc) or
clang 1.5 or 2.8, it works fine. The problem was introduced by this patch:

http://git.ffmpeg.org/?p=ffmpeg.git;a=commitdiff;h=f3d09d44b70492022964e2ead5f439bb7c96eaa2

At this point I'm not quite sure how to debug this further. Valgrind is clean
and there's no compiler warnings. I've checked to make sure that the
AV_ZERO32()s (which expect aligned memory, and zero only the first array
members of near_mv[4]) are not the problem, and they are not. Also, the removal
of the unused variable "best" is not causing any problems.

I could try to apply the patch above "piece-by-piece" and figure out which
"sub-change" causes the problem, but that's a lot of work. I was hoping you
could suggest some ways to further debug this issue, because I'm not really
sure where to go from here, and don't have infinite time to spend on this.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list