PATCH: add an assertion to gas/write.c

Ben Elliston bje@au1.ibm.com
Tue Oct 24 06:50:00 GMT 2006


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;
 }



More information about the Binutils mailing list