[LLVMbugs] [Bug 6304] New: AlphaRegisterInfo.cpp:306:52: warning: array subscript is above array bounds
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Feb 15 00:50:54 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=6304
Summary: AlphaRegisterInfo.cpp:306:52: warning: array subscript
is above array bounds
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: baldrick at free.fr
CC: llvmbugs at cs.uiuc.edu
According to gcc-4.5:
lib/Target/Alpha/AlphaRegisterInfo.cpp: In member function 'virtual void
llvm::AlphaRegisterInfo::emitEpilogue(llvm::MachineFunction&,
llvm::MachineBasicBlock&) const':
lib/Target/Alpha/AlphaRegisterInfo.cpp:306:52: warning: array subscript is
above array bounds
The line in question is this:
Msg << "Too big a stack frame at " + NumBytes;
Presumably here "+" is pointer addition, resulting in a pointer
into the string. At this point in the code gcc knows that NumBytes
is quite big (NumBytes > IMM_HIGH), so probably sees that this results
in pointing beyond the end of the string.
This is not the only place with this "Msg << c_string + Integer;"
construction, but is probably the only one where gcc knew that the
offset is always large.
--
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