[LLVMbugs] [Bug 8029] New: r112211 breaks ABI on Darwin (clang emits invalid function call)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 30 11:50:17 PDT 2010


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

           Summary: r112211 breaks ABI on Darwin (clang emits invalid
                    function call)
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: devlists at shadowlab.org
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=5428)
 --> (http://llvm.org/bugs/attachment.cgi?id=5428)
Assembly before and after the change.

After r112211, clang start to emit invalid function call and so, programs
crashes when calling system library like veclib.

For instance, the simple following code crashes badly in vU128Divide() when
executed:

-----------------------------------

#include <vecLib/vBigNum.h>
#include <vecLib/vBasicOps.h>

int main(int argc, char **argv) {
  vU128 remain;
  vU128 ten = { .s = {.MSW = 0, .d2 = 0, .d3 = 0, .LSW = 10} };
  vU128 bigint = { .s = {.MSW = 0, .d2 = 0, .d3 = 30038, .LSW = 2857641354} };  
  bigint.v = vU128Divide(bigint.v, ten.v, &remain.v);
  return bigint.s.MSW;
}

-----------------------------------

I attached generated llvm assembly before and after this change.

Note that simply reverting this change on trunk fixes the issue.

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