Bug #5659 Use of non-initialized variable
Submitted: 20 Sep 2004 8:16 Modified: 20 Sep 2004 10:28
Reporter: Anton Fedorov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:mysql-4.1.5-gamma-nightly-20040919 OS:
Assigned to: Jonas Oreland CPU Architecture:Any

[20 Sep 2004 8:16] Anton Fedorov
Description:
==32193== Conditional jump or move depends on uninitialised value(s)
==32193==    at 0x820CF6B: Configuration::fetch_configuration() (Configuration.cpp:239)
==32193==    by 0x809A87F: main (main.cpp:74)

How to repeat:
Run ndbd :)

Suggested fix:
ndb/src/kernel/vm/Configuration.cpp
in constructor:
Configuration::Configuration()
{
  _programName = 0;
  _connectString = 0;
  _fsPath = 0;
  _backupPath = 0;
  _initialStart = false;
  _daemonMode = false;
  m_config_retriever= 0;
}

add cleanup of m_clusterConfig

Configuration::Configuration()
{
  _programName = 0;
  _connectString = 0;
  _fsPath = 0;
  _backupPath = 0;
  _initialStart = false;
  _daemonMode = false;
  m_config_retriever= 0;
  m_clusterConfig = 0;
}
[20 Sep 2004 10:28] Jonas Oreland
Thanks for a excellent bug report :-)