This is the mail archive of the binutils@sourceware.org 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]

PATCH COMMITTED: Add missing local variable initialization


I discovered an uninitialized local variable in gold, in the scripting
support.  This caused script_test_2 to fail in an unlucky case when it
caused two different .note output sections to be created.  I committed
this patch to fix the problem.

Ian


2008-06-17  Ian Lance Taylor  <iant@google.com>

	* script-sections.cc (Script_sections::place_orphan): Initialize
	local variable exact.


Index: script-sections.cc
===================================================================
RCS file: /cvs/src/src/gold/script-sections.cc,v
retrieving revision 1.14
diff -p -u -r1.14 script-sections.cc
--- script-sections.cc	21 May 2008 21:37:44 -0000	1.14
+++ script-sections.cc	18 Jun 2008 04:14:58 -0000
@@ -2423,7 +2423,7 @@ Script_sections::place_orphan(Output_sec
        p != this->sections_elements_->end();
        ++p)
     {
-      bool exact;
+      bool exact = false;
       if ((*p)->place_orphan_here(os, &exact))
 	{
 	  place = p;

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