[llvm-bugs] [Bug 43929] New: Using large large arrays causes assertion failure
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Nov 7 06:53:27 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=43929
Bug ID: 43929
Summary: Using large large arrays causes assertion failure
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: AArch64
Assignee: unassignedbugs at nondot.org
Reporter: kiranchandramohan at gmail.com
CC: arnaud.degrandmaison at arm.com,
llvm-bugs at lists.llvm.org, peter.smith at linaro.org,
Ties.Stuij at arm.com
The following C program, when compiled with clang, leads to an assertion
failure. This program has a large local array.
lib/Target/AArch64/AArch64FrameLowering.cpp:962: virtual void
llvm::AArch64FrameLowering::emitPrologue(llvm::MachineFunction&,
llvm::MachineBasicBlock&) const: Assertion `NumBytes >= 0 && "Negative stack
allocation size!?"' failed.
#define LARGE_INT (256*1024*1024)
void set_large()
{
long int large[LARGE_INT];
large[0] = 1;
}
Surprisingly if I increase LARGE_INT to (512*1024*1024) then the assertion is
not hit. This difference in behaviour does not seem correct.
I have also see the following assertion being hit when working with large
arrays.
Target/AArch64/AArch64RegisterInfo.cpp:393: virtual bool
llvm::AArch64RegisterInfo::isFrameOffsetLegal(const llvm::MachineInstr*,
unsigned int, int64_t) const: Assertion `Offset <= INT_MAX && "Offset too big
to fit in int."' failed.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191107/45b0ac5f/attachment.html>
More information about the llvm-bugs
mailing list