This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Assembler crashes on invalid unwind records


If I understand the unwind records on ia64 correctly the .save pseudo ops
are only supposed to occur between .prologue and .body.  But if this
violated then the assembler can crash, because it references uninitialized
memory in the body record.  This patch will cause the assembler to give an
error message instead.

2002-03-08  Andreas Schwab  <schwab@suse.de>

	* config/tc-ia64.c (fixup_unw_records): Clear region when seeing a
	body record so that an error is given for misplaced .save
	pseudo-ops.

--- gas/config/tc-ia64.c.~1.64.2.1.~	2002-02-25 10:21:41.000000000 +0100
+++ gas/config/tc-ia64.c	2002-03-08 11:24:42.000000000 +0100
@@ -2709,7 +2709,11 @@
 	    size = (slot_index (last_addr, last_frag, first_addr, first_frag)
 		    + dir_len);
 	    rlen = ptr->r.record.r.rlen = size;
-	    region = ptr;
+	    if (ptr->r.type == body)
+	      /* End of region.  */
+	      region = 0;
+	    else
+	      region = ptr;
 	    break;
 	  }
 	case epilogue:

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]