[LLVMbugs] [Bug 2818] New: Segmentation fault on PPC64 generated code

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Sep 22 07:38:36 PDT 2008


           Summary: Segmentation fault on PPC64 generated code
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: ph.silva at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=2032)
 --> (http://llvm.org/bugs/attachment.cgi?id=2032)
LLVM .ll

I tried to compile the following code using llvm-gcc 2.3 and it compiles right,
but the PPC64 generated code (from llc) crashs with segfault.


int SumOrig_sum_ARI_I (int* A) {
        A[8] = 42;
        A[9876] = 876;
        return A[0]+A[1]+1;

I used the following main function to test this:

int main (void) {

 int a[1000000];
 a[0] = 10;
 a[1] = 20;

 printf("%d\n", SumOrig_sum_ARI_I(a));
 printf("%d\n", a[9876]);

 return 0;

On x86 the result is right:

henrique at r2d2:~$ ./main 

Follow attached LLVM .ll and the PPC64 code ( llc -march=ppc64 -mcpu=ppc64) and
just for comparison the GCC code for the same function.

The crash was on a PPC64 running Fedora 9.

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