http://llvm.org/bugs/show_bug.cgi?id=11019
Summary: ARM stack corruption due to byval parameter
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: ARM
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=7354)
--> (http://llvm.org/bugs/attachment.cgi?id=7354)
callsite_stack.ll
The attached example demonstrates how the presence of a byval argument at a
callsite can corrupt the caller's stack. The return value of main will be 0
instead of the correct value of 100.
This bug is caused by a disagreement between CCInfo and the ByVal handling code
about how large the call frame is going to be.
CCInfo.getNextStackOffset() is returning 4, thus 4 bytes are reserved on the
stack for the call sequence. However, the actual byval expansion writes 8 bytes
above SP.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs