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

            Bug ID: 22819
           Summary: [powerpc] powerpc-linux-gnu accesses memory below the
                    stack
           Product: libraries
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

powerpc-linux-gnu accesses memory below the stack - please see "-4(1)" below.

This is a nasty one as it only shows up under rare conditions - it was
quite hard to find the real cause of the problem.

$ cat test.c

int foo(int *);

int test(int *a) {
    return foo(a) + 1;
}

// EOF

$ clang-3.6.0 -target powerpc-linux-gnu -O2 -Wall -save-temps -c test.c

$ cat test.s

        .text
        .file   "test.bc"
        .globl  test
        .align  2
        .type   test,@function
test:                                   # @test
# BB#0:                                 # %entry
        mflr 0
        stw 31, -4(1)
        stw 0, 4(1)
        stwu 1, -16(1)
        mr 31, 1
        bl foo
        addi 3, 3, 1
        addi 1, 1, 16
        lwz 0, 4(1)
        lwz 31, -4(1)
        mtlr 0
        blr
.Ltmp0:
        .size   test, .Ltmp0-test
        .ident  "clang version 3.6.0 (tags/RELEASE_360/final)"
        .section        ".note.GNU-stack","",@progbits

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