This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: add an assertion to gas/write.c
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: binutils at sourceware dot org
- Date: Tue, 24 Oct 2006 14:47:55 +1000
- Subject: PATCH: add an assertion to gas/write.c
This is the first in a serious of miscellaneous patches I have
accumulated in my checkout. Tested with an all-targets build. Okay
to commit?
Ben
2006-10-24 Ben Elliston <bje@au.ibm.com>
* write.c (chain_frchains_together_1): Assert that this function
never returns a pointer to the auto variable `dummy'.
Index: write.c
===================================================================
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.102
diff -u -p -r1.102 write.c
--- write.c 22 Sep 2006 11:35:13 -0000 1.102
+++ write.c 24 Oct 2006 04:46:44 -0000
@@ -394,6 +394,7 @@ chain_frchains_together_1 (segT section,
}
}
assert (prev_frag->fr_type != 0);
+ assert (prev_frag != &dummy);
prev_frag->fr_next = 0;
return prev_frag;
}