[LLVMbugs] [Bug 11859] New: miscompilation of x264

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 26 02:04:58 PST 2012


             Bug #: 11859
           Summary: miscompilation of x264
           Product: clang
           Version: 3.0
          Platform: PC
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: mroi at users.sourceforge.net
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

clang 3.0 as shipping with Apple's Xcode developer tools miscompiles the H.264
encoder from the x264 project. The resulting x264 binary crashes.

Steps to Reproduce:
1. Retrieve x264 here:
2. configure and compile it using clang: CC=clang ./configure && make
3. Get this sample video:
4. Run the following command to encode (you need the ffmpeg tool installed):
ffmpeg -i bbc-r_m720p.mov -f rawvideo - 2> /dev/null | ../x264/x264 --input-res
1280x720 --bitrate 4000 --slices 4 --sliced-threads --threads 4 --no-cabac
--ref 3 --bframes 8 --b-pyramid none --no-weightb --weightp 0 --no-8x8dct --cqm
flat --b-adapt 2 --direct auto --me umh --merange 16 --partitions all --subme 9
--trellis 2 --rc-lookahead 60 -o bbc-r_m720p.h264 -

Expected Results:
The video gets encoded all the way through.

Actual Results:
x264 crashes after 24 frames.

I tested on Mac OS X, but the bug has been independently reproduced with clang
on Linux. See here:
Compiling the file encoder/analyse.c from x264 with -O1 instead of -O3 fixes
the problem.
Compiling x264 with llvm-gcc instead of clang also fixes the problem.

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