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

             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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


Summary:
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:
http://git.videolan.org/?p=x264.git;a=snapshot;h=bcd41dbcaa4430b2118d9f6828c2b9635cf9d58d;sf=tgz
2. configure and compile it using clang: CC=clang ./configure && make
3. Get this sample video:
http://movies.apple.com/movies/us/hd_gallery/gl1800/bbc-r_m720p.mov
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.

Regression:
I tested on Mac OS X, but the bug has been independently reproduced with clang
on Linux. See here:
http://mailman.videolan.org/pipermail/x264-devel/2012-January/009027.html
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to