This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH COMMITTED: Add missing local variable initialization
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Tue, 17 Jun 2008 21:17:47 -0700
- Subject: 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;