[LLVMbugs] [Bug 14195] New: Miscompilation when optimizing OpenSSL GOST R 34.11-94

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Oct 27 05:25:35 PDT 2012


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

             Bug #: 14195
           Summary: Miscompilation when optimizing OpenSSL GOST R 34.11-94
           Product: new-bugs
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: leo at sai.msu.ru
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9432
  --> http://llvm.org/bugs/attachment.cgi?id=9432
Test for optimization bug in openssl/engines/ccgost/gosthash.c

In trying to build OpenSSL with clang (Xcode 4.3.1 or MacPorts), I ran 
into a crypto algorithm where the LLVM optimizer is generating bad code 
for "engines/ccgost/gosthash.c" with "-O2" and above ("-O1" work fine).  

This error was found on LLVM 2.9, 3.0, 3.1, 3.2-trunk with frontends:
clang clang-mp-{2.9,3.{0,1,2}} llvm-gcc, for arch i386 and x86_64.

How reproduce:
leom:bug-ccgost leo$ clang -O1 -c gosthash.c
leom:bug-ccgost leo$ clang -O2 -o gostsum gostsum.c gost89.c gosthash.o
leom:bug-ccgost leo$ echo "test" | ./gostsum -t
2b01bffe495f44476cbc363254a5cbe71f54ff2187009dd36c5dfe6688055564 -
leom:bug-ccgost leo$ clang -O2 -c gosthash.c
leom:bug-ccgost leo$ clang -O2 -o gostsum gostsum.c gost89.c gosthash.o
leom:bug-ccgost leo$ echo "test" | ./gostsum -t
6d4abf2b7272c90c35995c1aa3c8126310e135da5d909d1d56d88a613152b4db -

or

$ sh tc.sh [compiler [flags]]

Sorry for my best English

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