This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Fix alpha assembler crash
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Jakub Bogusz <qboosh at pld-linux dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 24 Nov 2003 14:25:33 -0800
- Subject: PATCH: Fix alpha assembler crash
- References: <20031123235255.GB731@satan.blackhosts>
On Mon, Nov 24, 2003 at 12:52:55AM +0100, Jakub Bogusz wrote:
> Hello,
>
> I noticed that as from binutils 2.14.90.0.7 segfaults on alpha-linux on
> some wrongly generated file. It appeared that file had two '.end' for
> one function; but SEGV occurs in even simpler case, where '.end' is not
> preceded with '.ent' - just after error message:
>
> $ ~/gdb --args rpm/BUILD/binutils-2.14.90.0.7/gas/.libs/as-new as-test.S
> [...]
This patch fixes the assembler crash.
H.J.
----
2003-11-24 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-alpha.c (s_alpha_end): Don't crash if there is no
matching .ent.
--- gas/config/tc-alpha.c.ent 2003-11-24 11:56:53.000000000 -0800
+++ gas/config/tc-alpha.c 2003-11-24 14:20:45.000000000 -0800
@@ -4494,7 +4494,7 @@ s_alpha_end (dummy)
as_warn (_(".end directive names different symbol than .ent"));
/* Create an expression to calculate the size of the function. */
- if (sym)
+ if (sym && cur_frame_data)
{
OBJ_SYMFIELD_TYPE *obj = symbol_get_obj (sym);
expressionS *exp = xmalloc (sizeof (expressionS));