[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gas alpha-linux segfault with .prologue outside .ent
From: |
Alan Modra |
Subject: |
Re: gas alpha-linux segfault with .prologue outside .ent |
Date: |
Tue, 19 Nov 2002 18:03:20 +1030 |
User-agent: |
Mutt/1.4i |
On Tue, Nov 19, 2002 at 03:35:40AM +1100, Luke Deller wrote:
> On Mon, 18 Nov 2002, Alan Modra wrote:
> > True. Care to submit a patch?
>
> Sure. Here's a little patch which adds the error check to this function.
> The patch is against binutils-2.13.1 .
Thanks. In the interests of training another binutils contributor
(hopefully), here's what I actually applied, and how to present
patches. Note: ChangeLog entry as plain text (ie. not a diff),
diff using -up or -cp, preferably against mainline CVS, formatting!
See http://www.gnu.org/prep/standards_toc.html
gas/ChangeLog
* config/tc-alpha.c (s_alpha_prologue): as_bad when sym is NULL.
Index: gas/config/tc-alpha.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-alpha.c,v
retrieving revision 1.49
diff -u -p -r1.49 tc-alpha.c
--- gas/config/tc-alpha.c 7 Nov 2002 00:42:18 -0000 1.49
+++ gas/config/tc-alpha.c 19 Nov 2002 07:20:45 -0000
@@ -4521,7 +4521,12 @@ s_alpha_prologue (ignore)
sym = ecoff_get_cur_proc_sym ();
else
sym = alpha_cur_ent_sym;
- know (sym != NULL);
+
+ if (sym == NULL)
+ {
+ as_bad (_(".prologue directive without a preceding .ent directive"));
+ return;
+ }
switch (arg)
{
--
Alan Modra
IBM OzLabs - Linux Technology Centre