[LLVMbugs] [Bug 3789] New: code misscompilation

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Mar 11 13:50:33 PDT 2009


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

           Summary: code misscompilation
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: C
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: castet.matthieu at free.fr
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2704)
 --> (http://llvm.org/bugs/attachment.cgi?id=2704)
preprocessed source code

Hi,

when building ffmpeg with clang/llvm I hit a file miss-compilation. I attached
the preprocessed version of the file.
Look in svq1_encode_plane function. There is 2 call to av_log. One in case of
error inside the 2 loop (followed by return -1) and another one at the end of
the last loop.
Now lest generate bytecode :
$ clang -S -emit-llvm -disable-free --relocation-model=static --unwind-tables=0
--fmath-errno=0 -g -O3 -Wundef -std=c99 -o /tmp/tmpW7pW3F.ll -x c svq1encp.c

Search for av_log in svq1_encode_plane function, and you will find that both
av_log are followed by return -1.
So the "for (y = 0; y < block_height; y++) {" loop run only one time and return
with -1.
That very wrong.


-- 
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