forked from pool/binutils
62 lines
1.7 KiB
Diff
62 lines
1.7 KiB
Diff
PR gas/13449
|
|
* config/tc-arm.c (create_unwind_entry): Zero allocated table
|
|
entries.
|
|
|
|
===================================================================
|
|
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
|
|
retrieving revision 1.511
|
|
retrieving revision 1.512
|
|
diff -u -r1.511 -r1.512
|
|
--- src/gas/config/tc-arm.c 2011/12/07 16:58:34 1.511
|
|
+++ src/gas/config/tc-arm.c 2011/12/15 10:21:49 1.512
|
|
@@ -3540,6 +3540,7 @@
|
|
record_alignment (now_seg, 2);
|
|
|
|
ptr = frag_more (8);
|
|
+ memset (ptr, 0, 8);
|
|
where = frag_now_fix () - 8;
|
|
|
|
/* Self relative offset of the function start. */
|
|
@@ -19926,8 +19927,12 @@
|
|
size = unwind.opcode_count - 2;
|
|
}
|
|
else
|
|
- /* An extra byte is required for the opcode count. */
|
|
- size = unwind.opcode_count + 1;
|
|
+ {
|
|
+ gas_assert (unwind.personality_index == -1);
|
|
+
|
|
+ /* An extra byte is required for the opcode count. */
|
|
+ size = unwind.opcode_count + 1;
|
|
+ }
|
|
|
|
size = (size + 3) >> 2;
|
|
if (size > 0xff)
|
|
@@ -19953,7 +19958,7 @@
|
|
ptr += 4;
|
|
|
|
/* Set the first byte to the number of additional words. */
|
|
- data = size - 1;
|
|
+ data = size > 0 ? size - 1 : 0;
|
|
n = 3;
|
|
break;
|
|
|
|
===================================================================
|
|
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
|
|
retrieving revision 1.512
|
|
retrieving revision 1.513
|
|
diff -u -r1.512 -r1.513
|
|
--- src/gas/config/tc-arm.c 2011/12/15 10:21:49 1.512
|
|
+++ src/gas/config/tc-arm.c 2011/12/21 17:07:26 1.513
|
|
@@ -19944,6 +19944,8 @@
|
|
|
|
/* Allocate the table entry. */
|
|
ptr = frag_more ((size << 2) + 4);
|
|
+ /* PR 13449: Zero the table entries in case some of them are not used. */
|
|
+ memset (ptr, 0, (size << 2) + 4);
|
|
where = frag_now_fix () - ((size << 2) + 4);
|
|
|
|
switch (unwind.personality_index)
|
|
|
|
|