This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcc/61585] New: Subscript-out-of-range in unwind-seh.c?
- From: "lh_mouse at 126 dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 Jun 2014 09:43:06 +0000
- Subject: [Bug libgcc/61585] New: Subscript-out-of-range in unwind-seh.c?
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61585
Bug ID: 61585
Summary: Subscript-out-of-range in unwind-seh.c?
Product: gcc
Version: 4.10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: lh_mouse at 126 dot com
In file gcc/libgcc/unwind-seh.c, line 69:
struct _Unwind_Context
{
_Unwind_Word cfa;
_Unwind_Word ra;
_Unwind_Word reg[2]; // ** Defined here.
PDISPATCHER_CONTEXT disp;
};
/* Get the value of register INDEX as saved in CONTEXT. */
_Unwind_Word
_Unwind_GetGR (struct _Unwind_Context *c, int index)
{
if (index < 0 || index > 2) // ** Isn't 2 an out-of-range index??
abort ();
return c->reg[index]; // ** Accessed here.
}