summaryrefslogtreecommitdiff
path: root/libgcc/unwind-dw2.c
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-13 17:07:50 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-13 17:07:50 +0000
commit42b3e3d6b3ce3caa1c2f99beeb18f8a33eced98c (patch)
tree32cdf864570823902c4c333d0cc26c7802ea8a07 /libgcc/unwind-dw2.c
parent0f844e094204d8a0363606ac4fa756f11d18da1f (diff)
downloadgcc-42b3e3d6b3ce3caa1c2f99beeb18f8a33eced98c.tar.gz
Assert DWARF register size <= saved reg size
2012-03-13 H.J. Lu <hongjiu.lu@intel.com> * unwind-dw2.c (_Unwind_SetGRValue): Assert DWARF register size <= saved reg size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185346 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/unwind-dw2.c')
-rw-r--r--libgcc/unwind-dw2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c
index 475ad00bf52..d1c62eef153 100644
--- a/libgcc/unwind-dw2.c
+++ b/libgcc/unwind-dw2.c
@@ -294,7 +294,8 @@ _Unwind_SetGRValue (struct _Unwind_Context *context, int index,
{
index = DWARF_REG_TO_UNWIND_COLUMN (index);
gcc_assert (index < (int) sizeof(dwarf_reg_size_table));
- gcc_assert (dwarf_reg_size_table[index] == sizeof (_Unwind_Context_Reg_Val));
+ /* Return column size may be smaller than _Unwind_Context_Reg_Val. */
+ gcc_assert (dwarf_reg_size_table[index] <= sizeof (_Unwind_Context_Reg_Val));
context->by_value[index] = 1;
context->reg[index] = _Unwind_Get_Unwind_Context_Reg_Val (val);